diff --git a/charts/hypershift-aws-template/Chart.yaml b/charts/hypershift-aws-template/Chart.yaml index 5b45ba7..0dc42d1 100644 --- a/charts/hypershift-aws-template/Chart.yaml +++ b/charts/hypershift-aws-template/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/hypershift-aws-template/templates/_helpers.tpl b/charts/hypershift-aws-template/templates/_helpers.tpl index 3193ded..131f7ad 100644 --- a/charts/hypershift-aws-template/templates/_helpers.tpl +++ b/charts/hypershift-aws-template/templates/_helpers.tpl @@ -11,16 +11,16 @@ image: public.ecr.aws/aws-cli/aws-cli:2.17.41@sha256:76c484c1d90d4c798554b92427c42f7f33f5626e437ee120e9c90e63c35a886d env: - name: AWS_SHARED_CREDENTIALS_FILE - value: /secret/aws-credentials + value: /opt/hypershift/secret/aws-credentials volumeMounts: - name: secret - mountPath: /secret + mountPath: /opt/hypershift/secret - name: sts - mountPath: /sts + mountPath: /opt/hypershift/sts command: ["/bin/sh"] args: - -ec - | - aws sts get-session-token --output json > /sts/token.json + aws sts get-session-token --output json > /opt/hypershift/sts/token.json echo "STS token acquired successfully" {{- end -}} diff --git a/charts/hypershift-aws-template/templates/configmap.yaml b/charts/hypershift-aws-template/templates/configmap.yaml new file mode 100644 index 0000000..1913fdb --- /dev/null +++ b/charts/hypershift-aws-template/templates/configmap.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-{{ .Release.Name }} + namespace: "{{ .Release.Namespace }}" +data: + image-content-sources.yaml: | + {{- .Values.imageContentSources | nindent 4 }} diff --git a/charts/hypershift-aws-template/templates/create-cluster-job.yaml b/charts/hypershift-aws-template/templates/create-cluster-job.yaml index ccaa3ab..d0909be 100644 --- a/charts/hypershift-aws-template/templates/create-cluster-job.yaml +++ b/charts/hypershift-aws-template/templates/create-cluster-job.yaml @@ -13,6 +13,9 @@ spec: restartPolicy: Never volumes: {{- include "credential-volumes" . | nindent 8 }} + - name: config + configMap: + name: config-{{ .Release.Name }} initContainers: {{- include "aws-sts-init-container" . | nindent 8 }} containers: @@ -20,9 +23,11 @@ spec: image: "{{ .Values.hypershiftImage }}" volumeMounts: - name: sts - mountPath: /sts + mountPath: /opt/hypershift/sts - name: secret - mountPath: /secret + mountPath: /opt/hypershift/secret + - name: config + mountPath: /opt/hypershift/config command: - hypershift args: @@ -36,11 +41,13 @@ spec: - --namespace - "{{ .Release.Namespace }}" - --sts-creds - - /sts/token.json + - /opt/hypershift/sts/token.json - --role-arn - "{{ .Values.hypershiftRoleArn }}" - --pull-secret - - /secret/pull-secret + - /opt/hypershift/secret/pull-secret + - --image-content-sources + - /opt/hypershift/config/image-content-sources.yaml - --base-domain - "{{ .Values.baseDomain }}" - --region diff --git a/charts/hypershift-aws-template/templates/destroy-cluster-job.yaml b/charts/hypershift-aws-template/templates/destroy-cluster-job.yaml index 82e9267..bfc444f 100644 --- a/charts/hypershift-aws-template/templates/destroy-cluster-job.yaml +++ b/charts/hypershift-aws-template/templates/destroy-cluster-job.yaml @@ -25,7 +25,7 @@ spec: image: "{{ .Values.hypershiftImage }}" volumeMounts: - name: sts - mountPath: /sts + mountPath: /opt/hypershift/sts command: - hypershift args: @@ -39,7 +39,7 @@ spec: - --namespace - "{{ .Release.Namespace }}" - --sts-creds - - /sts/token.json + - /opt/hypershift/sts/token.json - --role-arn - "{{ .Values.hypershiftRoleArn }}" - --region diff --git a/charts/hypershift-aws-template/values.schema.json b/charts/hypershift-aws-template/values.schema.json index 41aa7b1..bae189f 100644 --- a/charts/hypershift-aws-template/values.schema.json +++ b/charts/hypershift-aws-template/values.schema.json @@ -5,6 +5,7 @@ "baseDomain", "hypershiftImage", "hypershiftRoleArn", + "imageContentSources", "instanceType", "nodePoolReplicas", "region", @@ -25,6 +26,10 @@ "type": "string", "description": "The ARN of the IAM role assumed by the STS credentials provided to the hypershift CLI" }, + "imageContentSources": { + "type": "string", + "description": "Alternate registry information containing a list of sources and their mirrors in yaml format" + }, "instanceType": { "type": "string", "description": "AWS EC2 instance type for worker nodes. Use m5.* for amd64 and m6g.* for arm64.", diff --git a/charts/hypershift-aws-template/values.yaml b/charts/hypershift-aws-template/values.yaml index 85e7e08..d600985 100644 --- a/charts/hypershift-aws-template/values.yaml +++ b/charts/hypershift-aws-template/values.yaml @@ -2,6 +2,8 @@ hypershiftImage: quay.io/hypershift/hypershift-operator:latest +imageContentSources: "" + instanceType: m5.large nodePoolReplicas: 2