-
Notifications
You must be signed in to change notification settings - Fork 0
Add multi-cloud support, Azure Key Vault, ECR pull secrets, and analytics Redis SSL #29
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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
12162df
WIP
MarceloRGonc fa2cbc6
WIP
MarceloRGonc 6d19312
fix: address PR review comments
MarceloRGonc 3d6fe6d
docs: update README with tenantId, correct ECR secret keys, and analy…
MarceloRGonc aebd6ed
fix: address review comments — checksum, registry validation, idempot…
MarceloRGonc ec404ee
fix: add SHA256 verification for kubectl download in ECR credential r…
MarceloRGonc 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| {{- if .Values.analytics.configOverride }} | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ .Values.analytics.name }}-config | ||
| labels: | ||
| {{- include "openops.componentLabels" (dict "root" . "component" "analytics") | nindent 4 }} | ||
| data: | ||
| superset_config_docker.py: | | ||
| {{ .Values.analytics.configOverride | indent 4 }} | ||
| {{- end }} |
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,174 @@ | ||
| {{- if .Values.ecrCredentialRefresh.enabled }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ .Values.ecrCredentialRefresh.serviceAccount.name | default "ecr-credential-refresh" }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- with .Values.ecrCredentialRefresh.serviceAccount.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: ecr-credential-refresh | ||
| namespace: {{ .Release.Namespace }} | ||
| rules: | ||
| - apiGroups: [""] | ||
| resources: ["secrets"] | ||
| resourceNames: [{{ .Values.ecrCredentialRefresh.imagePullSecretName | default "ecr-pull-secret" | quote }}] | ||
| verbs: ["get", "patch", "delete"] | ||
| - apiGroups: [""] | ||
| resources: ["secrets"] | ||
| verbs: ["create"] | ||
|
Comment on lines
+19
to
+25
|
||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: ecr-credential-refresh | ||
| namespace: {{ .Release.Namespace }} | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ .Values.ecrCredentialRefresh.serviceAccount.name | default "ecr-credential-refresh" }} | ||
| namespace: {{ .Release.Namespace }} | ||
| roleRef: | ||
| kind: Role | ||
| name: ecr-credential-refresh | ||
| apiGroup: rbac.authorization.k8s.io | ||
| --- | ||
| apiVersion: batch/v1 | ||
| kind: CronJob | ||
| metadata: | ||
| name: ecr-credential-refresh | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: ecr-credential-refresh | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| spec: | ||
| schedule: "0 */6 * * *" | ||
| successfulJobsHistoryLimit: 2 | ||
| failedJobsHistoryLimit: 3 | ||
| concurrencyPolicy: Forbid | ||
| jobTemplate: | ||
| spec: | ||
| backoffLimit: 3 | ||
| template: | ||
| spec: | ||
| serviceAccountName: {{ .Values.ecrCredentialRefresh.serviceAccount.name | default "ecr-credential-refresh" }} | ||
| restartPolicy: OnFailure | ||
| containers: | ||
| - name: ecr-credential-refresh | ||
| image: amazon/aws-cli:2.27.18 | ||
| env: | ||
| - name: AWS_ACCESS_KEY_ID | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ .Values.ecrCredentialRefresh.awsSecretName | default "ecr-credentials" }} | ||
| key: AWS_ACCESS_KEY_ID | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ .Values.ecrCredentialRefresh.awsSecretName | default "ecr-credentials" }} | ||
| key: AWS_SECRET_ACCESS_KEY | ||
|
MarceloRGonc marked this conversation as resolved.
|
||
| - name: AWS_REGION | ||
| value: {{ .Values.ecrCredentialRefresh.awsRegion | quote }} | ||
| - name: ECR_REGISTRY | ||
| value: {{ required "ecrCredentialRefresh.registry is required when ecrCredentialRefresh is enabled" .Values.ecrCredentialRefresh.registry | quote }} | ||
| - name: SECRET_NAME | ||
| value: {{ .Values.ecrCredentialRefresh.imagePullSecretName | default "ecr-pull-secret" | quote }} | ||
| - name: NAMESPACE | ||
| value: {{ .Release.Namespace }} | ||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| set -euo pipefail | ||
| KUBECTL_VERSION="v1.32.3" | ||
|
MarceloRGonc marked this conversation as resolved.
|
||
| KUBECTL_SHA256="ab209d0c5134b61486a0486585604a616a5bb2fc07df46d304b3c95817b2d79f" | ||
| curl -sLO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" | ||
|
MarceloRGonc marked this conversation as resolved.
|
||
| echo "${KUBECTL_SHA256} kubectl" | sha256sum -c - | ||
| chmod +x kubectl && mv kubectl /usr/local/bin/ | ||
| TOKEN=$(aws ecr get-login-password --region "$AWS_REGION") | ||
| kubectl create secret docker-registry "$SECRET_NAME" \ | ||
| -n "$NAMESPACE" \ | ||
| --docker-server="$ECR_REGISTRY" \ | ||
| --docker-username=AWS \ | ||
| --docker-password="$TOKEN" \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
|
Comment on lines
+88
to
+99
|
||
| echo "✅ ECR pull secret refreshed successfully" | ||
|
Comment on lines
+83
to
+100
|
||
| resources: | ||
| requests: | ||
| memory: "64Mi" | ||
| cpu: "50m" | ||
| limits: | ||
| memory: "128Mi" | ||
| cpu: "100m" | ||
| --- | ||
| # Initial Job to create the secret immediately on install/upgrade | ||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: ecr-credential-refresh-init | ||
| namespace: {{ .Release.Namespace }} | ||
| annotations: | ||
| "helm.sh/hook": post-install,post-upgrade | ||
| "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
| labels: | ||
| app.kubernetes.io/name: ecr-credential-refresh | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| spec: | ||
| backoffLimit: 3 | ||
| template: | ||
| spec: | ||
| serviceAccountName: {{ .Values.ecrCredentialRefresh.serviceAccount.name | default "ecr-credential-refresh" }} | ||
| restartPolicy: OnFailure | ||
| containers: | ||
| - name: ecr-credential-refresh | ||
| image: amazon/aws-cli:2.27.18 | ||
| env: | ||
| - name: AWS_ACCESS_KEY_ID | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ .Values.ecrCredentialRefresh.awsSecretName | default "ecr-credentials" }} | ||
| key: AWS_ACCESS_KEY_ID | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ .Values.ecrCredentialRefresh.awsSecretName | default "ecr-credentials" }} | ||
| key: AWS_SECRET_ACCESS_KEY | ||
|
MarceloRGonc marked this conversation as resolved.
|
||
| - name: AWS_REGION | ||
| value: {{ .Values.ecrCredentialRefresh.awsRegion | quote }} | ||
| - name: ECR_REGISTRY | ||
| value: {{ required "ecrCredentialRefresh.registry is required when ecrCredentialRefresh is enabled" .Values.ecrCredentialRefresh.registry | quote }} | ||
| - name: SECRET_NAME | ||
| value: {{ .Values.ecrCredentialRefresh.imagePullSecretName | default "ecr-pull-secret" | quote }} | ||
| - name: NAMESPACE | ||
| value: {{ .Release.Namespace }} | ||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| set -euo pipefail | ||
| KUBECTL_VERSION="v1.32.3" | ||
| KUBECTL_SHA256="ab209d0c5134b61486a0486585604a616a5bb2fc07df46d304b3c95817b2d79f" | ||
| curl -sLO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" | ||
| echo "${KUBECTL_SHA256} kubectl" | sha256sum -c - | ||
| chmod +x kubectl && mv kubectl /usr/local/bin/ | ||
| TOKEN=$(aws ecr get-login-password --region "$AWS_REGION") | ||
| kubectl create secret docker-registry "$SECRET_NAME" \ | ||
| -n "$NAMESPACE" \ | ||
| --docker-server="$ECR_REGISTRY" \ | ||
| --docker-username=AWS \ | ||
| --docker-password="$TOKEN" \ | ||
| --dry-run=client -o yaml | kubectl apply -f - | ||
| echo "✅ ECR pull secret created successfully" | ||
| resources: | ||
| requests: | ||
| memory: "64Mi" | ||
| cpu: "50m" | ||
| limits: | ||
| memory: "128Mi" | ||
| cpu: "100m" | ||
| {{- end }} | ||
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.
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.