-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Rewrite ASM module #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kaariger
merged 43 commits into
terraform-google-modules:master
from
Monkeyanator:rewrite-asm-module
Mar 3, 2022
Merged
Rewrite ASM module #1140
Changes from 20 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
285dd05
Remove previous ASM module and add initial implementation of new
912ca06
Move from kubernetes_manifest to bash CPR creation
afed279
Add meshconfig.googleapis.com service
88f7600
Add namespace to CPR creation script wait
0905359
Change example to use google_container_cluster
8538e86
Improve CPR status wait duration
11f9d90
Use retries rather than sleeping to wait for CPR CRD existence
56240f1
Enable servicemesh feature in module
5235884
Revert changes to examples
c61787a
Fix enable_mdp to just enable CNI
f5b65bd
Lint
4818dc6
minor fixes
8ce0635
Bump timeout on status wait
c961aaa
Don't create MeshConfig if unset
7ad8320
Fix ASM sample
e4e81d6
Update README autogen
7f1b0e2
Minor fixes
22dbbea
Remove meshConfig from module
3f0e6b2
fix end to end tests
83a1112
lint fixes
a787940
Remove enable_mdp, add enable_vpc_sc and fleet_id
3be283c
move VPC-SC from labels to annotations
5af57bf
update README
347c75a
use default node pool size
1bc68e4
use wip for exmaple cluster creation
3801f7b
add feature enablement back to module
9e63a53
lint
c963e4c
remove feature enablement from module
aea6fe5
remove depends_on
30ea4ba
fix unspecified channel bug
3ae8025
minor fixes
7a4867e
add more testing
f92c91e
update docs
33c742d
change required module version
036ecc8
fix cclb
04484ee
change registry source to run in CI
d46465a
update CROSS_CLUSTER_SERVICE_DISCOVERY to multicluster_mode
3848a0d
update README
d195981
fix test
6faadcf
fix wording
a8e32f5
remove from README
bc7449d
iterate on comments
396776a
Merge branch 'master' into rewrite-asm-module
kaariger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
if [ "$#" -lt 3 ]; then | ||
Monkeyanator marked this conversation as resolved.
Show resolved
Hide resolved
|
||
>&2 echo "Not all expected arguments set." | ||
exit 1 | ||
fi | ||
|
||
REVISION_NAME=$1; shift | ||
CHANNEL=$1; shift | ||
ENABLE_CNI=$1; shift | ||
|
||
# Wait for the CRD to get created before creating the CPR. Not possible to use `kubectl --wait ...` here since | ||
# the CRD won't exist at the time of checking (https://stackoverflow.com/questions/57115602/how-to-kubectl-wait-for-crd-creation) | ||
readonly CPR_RESOURCE=controlplanerevisions.mesh.cloud.google.com | ||
for _i in {1..18}; do | ||
echo "Ensuring ControlPlaneRevision exists in cluster... attempt ${_i}" | ||
if kubectl get crd "${CPR_RESOURCE}" | ||
then | ||
break | ||
else | ||
sleep 10 | ||
fi | ||
done | ||
|
||
kubectl wait --for condition=established --timeout=60s crd/"${CPR_RESOURCE}" | ||
|
||
cat <<EOF | kubectl apply -f - | ||
apiVersion: mesh.cloud.google.com/v1beta1 | ||
kind: ControlPlaneRevision | ||
metadata: | ||
name: "${REVISION_NAME}" | ||
namespace: istio-system | ||
labels: | ||
mesh.cloud.google.com/managed-cni-enabled: "${ENABLE_CNI}" | ||
spec: | ||
type: managed_service | ||
channel: "${CHANNEL}" | ||
EOF | ||
|
||
kubectl wait -n istio-system --for=condition=Reconciled controlplanerevision/"${REVISION_NAME}" --timeout 10m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.