Skip to content
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

refactor: override missing images #69

Open
wants to merge 1 commit into
base: 2024-12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/ssd/config/supplychain-api/app-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ssdIngress: {{.Values.global.ssdUI.protocol}}://{{.Values.global.ssdUI.host}}
detectorImage: quay.io/opsmxpublic/kubernetes-detector:v1.0.2
kubescapeImage: quay.io/opsmxpublic/kubescape-service:v0.0.1
detectorImage: {{ template "kubedetector.image" . }}
kubescapeImage: {{ template "kubescape.image" . }}
tokenMachine:
host: http://token-machine
port: 8050
Expand Down
31 changes: 31 additions & 0 deletions charts/ssd/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ Return the proper Supplychain-api Image
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper k8s-decoder Image
*/}}
{{- define "k8sdecoder.image" -}}
{{- $registryName := .Values.imageCredentials.registry -}}
{{- $repositoryName := .Values.k8sdecoder.image.repository -}}
{{- $tag := .Values.k8sdecoder.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper dgraph Image
*/}}
Expand Down Expand Up @@ -139,6 +149,27 @@ Return the proper kube-detector image name
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper kubescape-service image name
*/}}
{{- define "kubescape.image" -}}
{{- $registryName := .Values.imageCredentials.registry -}}
{{- $repositoryName := .Values.kubescape.image.repository -}}
{{- $tag := .Values.kubescape.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper opsmx-custom-binaries image name
*/}}
{{- define "opsmxcustombinaries.image" -}}
{{- $registryName := .Values.imageCredentials.registry -}}
{{- $repositoryName := .Values.opsmxcustombinaries.image.repository -}}
{{- $tag := .Values.opsmxcustombinaries.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}


{{/*
Return the proper Mobsf image name
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/ssd/templates/automation/automation-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
- /bin/bash
- +x
- '-c'
image: quay.io/opsmxpublic/opsmx-custom-binaries:kubectl-spin-cli-git-bash-jq-yq
image: {{ template "opsmxcustombinaries.image" . }}
imagePullPolicy: IfNotPresent
name: setup-update
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion charts/ssd/templates/ssd-gate/ssd-gate-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
- /tmp/decoder/secret-decoder.sh # Replace secrets with the values from k8s secrets, use another script for vault, AWS-secrets, etc.
- /tmp/config # source
- /app # Destination
image: quay.io/opsmxpublic/k8s-decoder:hal
image: {{ template "k8sdecoder.image" . }}
imagePullPolicy: IfNotPresent
name: replace-secrets
resources: {}
Expand Down
15 changes: 14 additions & 1 deletion charts/ssd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ zap:
kubedetector:
image:
repository: kubernetes-detector
tag: v1.0.1
tag: v1.0.2
kubescape:
image:
repository: kubescape-service
Expand Down Expand Up @@ -516,3 +516,16 @@ temporal:
enabled: false
update:
enabled: false

################################################
k8sdecoder:
image:
repository: k8s-decoder
tag: hal

################################################
opsmxcustombinaries:
image:
repository: opsmx-custom-binaries
tag: kubectl-spin-cli-git-bash-jq-yq