Skip to content

Commit

Permalink
Merge branch 'main' into add_stack_params
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree authored May 2, 2023
2 parents 90f562a + 4ac3ce6 commit ceefd71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 11 additions & 2 deletions git-repo/create-cluster-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
value: "cluster_uuid"
- name: template_name
value: "aws-reference"
- name: cloud_account_id
value: "NULL"

templates:
- name: createClusterRepo
Expand All @@ -33,7 +35,6 @@ spec:
gh repo create ${USERNAME}/${CLUSTER_ID} --public --confirm
gh repo create ${USERNAME}/${CLUSTER_ID}-manifests --public --confirm
}
function gitea_create_repo() {
Expand Down Expand Up @@ -69,7 +70,6 @@ spec:
cp -r ${CONTRACT_ID}/${TEMPLATE_NAME} ${CLUSTER_ID}/${CLUSTER_ID}
## Replace site-values with fetched params ##
sed -i "s/clusterName:\ cluster.local/clusterName:\ $CLUSTER_ID/g" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
case $INFRA_PROVIDER in
Expand All @@ -95,6 +95,13 @@ spec:
sed -i "s/cpReplicas:\ CHANGEME/cpReplicas: 3/g" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
sed -i "s/mpReplicas:\ CHANGEME/mpReplicas: $val_mp_replicas/g" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
sed -i "s/mpMachineType:\ CHANGEME/mpMachineType: $val_mp_machine_type/g" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
## multi-tenancy ##
if [ "$CLOUD_ACCOUNT_ID" = "NULL" ]; then
sed -i '/multitenancyId/,+2d' $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
else
sed -i "s/cloudAccountID:\ CHANGEME/cloudAccountID: $CLOUD_ACCOUNT_ID/g" $CLUSTER_ID/$CLUSTER_ID/tks-cluster/site-values.yaml
fi
;;
byoh)
Expand Down Expand Up @@ -146,6 +153,8 @@ spec:
value: "{{workflow.parameters.cluster_id}}"
- name: TEMPLATE_NAME
value: "{{workflow.parameters.template_name}}"
- name: CLOUD_ACCOUNT_ID
value: "{{workflow.parameters.cloud_account_id}}"
- name: CLUSTER_INFO
value: "{{inputs.parameters.cluster_info}}"
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions tks-cluster/create-usercluster-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
value: "C011b88fa"
- name: site_name
value: "{{ workflow.parameters.cluster_id }}"
- name: cloud_account_id
value: "NULL"
- name: template_name
value: "aws-reference"
- name: git_account
Expand Down

0 comments on commit ceefd71

Please sign in to comment.