mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-08 06:08:04 -05:00
29dcb72bea
The existingConfig field is always set to true during create, as we use the IAM create step to generate the config in all cases. Accordingly, secret injection into config isn't needed anymore in create. This fixes a bug where other parameters like Kubernetes version and cluster name wouldn't be injected into the config due to existingConfig being true. Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
name: Constellation IAM create
|
|
description: Create IAM configuration for a Constellation cluster.
|
|
|
|
inputs:
|
|
cloudProvider:
|
|
description: "Either 'aws', 'azure' or 'gcp'."
|
|
required: true
|
|
kubernetesVersion:
|
|
description: "Kubernetes version to create the cluster from."
|
|
required: true
|
|
namePrefix:
|
|
description: "Name prefix to use for resources."
|
|
required: true
|
|
#
|
|
# AWS specific inputs
|
|
#
|
|
awsZone:
|
|
description: "AWS zone to deploy Constellation in."
|
|
required: false
|
|
#
|
|
# Azure specific inputs
|
|
#
|
|
azureRegion:
|
|
description: "Azure region to deploy Constellation in."
|
|
required: false
|
|
#
|
|
# GCP specific inputs
|
|
#
|
|
gcpProjectID:
|
|
description: "The GCP project ID to deploy Constellation in."
|
|
required: false
|
|
gcpZone:
|
|
description: "The GCP zone to deploy Constellation in."
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Generate config
|
|
id: generate-config
|
|
shell: bash
|
|
# TODO(katexochen): Remove the generate-config flag once v2.10 is released.
|
|
run: |
|
|
output=$(constellation iam create --help)
|
|
if [[ $output == *"generate-config"* ]]; then
|
|
echo "flag=--generate-config" | tee -a "$GITHUB_OUTPUT"
|
|
exit 0
|
|
fi
|
|
|
|
echo "flag=--update-config" | tee -a "$GITHUB_OUTPUT"
|
|
constellation config generate ${{ inputs.cloudProvider }} --kubernetes=${{ inputs.kubernetesVersion }}
|
|
|
|
- name: Constellation iam create aws
|
|
shell: bash
|
|
if: inputs.cloudProvider == 'aws'
|
|
run: |
|
|
constellation iam create aws \
|
|
--zone=${{ inputs.awsZone }} \
|
|
--prefix=${{ inputs.namePrefix }} \
|
|
${{ steps.generate-config.outputs.flag }} \
|
|
--yes
|
|
|
|
- name: Constellation iam create azure --kubernetes=${{ inputs.kubernetesVersion }}
|
|
shell: bash
|
|
if: inputs.cloudProvider == 'azure'
|
|
run: |
|
|
constellation iam create azure \
|
|
--region=${{ inputs.azureRegion }} \
|
|
--resourceGroup="${{ inputs.namePrefix }}-rg" \
|
|
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
|
|
${{ steps.generate-config.outputs.flag }} \
|
|
--yes
|
|
|
|
- name: Constellation iam create gcp
|
|
shell: bash
|
|
if: inputs.cloudProvider == 'gcp'
|
|
run: |
|
|
constellation iam create gcp \
|
|
--projectID=${{ inputs.gcpProjectID }} \
|
|
--zone=${{ inputs.gcpZone }} \
|
|
--serviceAccountID="${{ inputs.namePrefix }}-sa" \
|
|
${{ steps.generate-config.outputs.flag }} \
|
|
--yes
|