mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-07-11 04:11:44 +00:00
Improve helm chart allowing for lock of the worker image
This commit is contained in:
+2
-2
@@ -10,9 +10,9 @@ description: |
|
|||||||
|
|
||||||
type: application
|
type: application
|
||||||
|
|
||||||
version: 0.2.44
|
version: 0.5.47
|
||||||
|
|
||||||
appVersion: "0.2.44"
|
appVersion: "0.5.47"
|
||||||
|
|
||||||
home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator
|
home: https://github.com/lukaszraczylo/kubernetes-images-sync-operator
|
||||||
|
|
||||||
|
|||||||
@@ -51,12 +51,8 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create the name of the service account to use
|
Get the worker image
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "chart.serviceAccountName" -}}
|
{{- define "chart.workerImage" -}}
|
||||||
{{- if .Values.serviceAccount.create }}
|
{{- printf "%s:%s" .Values.images.worker.repository .Values.images.worker.tag }}
|
||||||
{{- default (include "chart.fullname" .) .Values.serviceAccount.name }}
|
|
||||||
{{- else }}
|
|
||||||
{{- default "default" .Values.serviceAccount.name }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ spec:
|
|||||||
- jsonPath: .status.progress
|
- jsonPath: .status.progress
|
||||||
name: Progress
|
name: Progress
|
||||||
type: string
|
type: string
|
||||||
|
- jsonPath: .status.completedImages
|
||||||
|
name: Images
|
||||||
|
type: string
|
||||||
|
- jsonPath: .status.totalImages
|
||||||
|
name: Total
|
||||||
|
type: string
|
||||||
- jsonPath: .metadata.creationTimestamp
|
- jsonPath: .metadata.creationTimestamp
|
||||||
name: Age
|
name: Age
|
||||||
type: date
|
type: date
|
||||||
@@ -159,8 +165,14 @@ spec:
|
|||||||
status:
|
status:
|
||||||
description: ClusterImageExportStatus defines the observed state of ClusterImageExport
|
description: ClusterImageExportStatus defines the observed state of ClusterImageExport
|
||||||
properties:
|
properties:
|
||||||
|
completedImages:
|
||||||
|
description: Number of images that have completed export
|
||||||
|
type: integer
|
||||||
progress:
|
progress:
|
||||||
type: string
|
type: string
|
||||||
|
totalImages:
|
||||||
|
description: Total number of images to be exported
|
||||||
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
served: true
|
served: true
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ spec:
|
|||||||
fieldPath: spec.serviceAccountName
|
fieldPath: spec.serviceAccountName
|
||||||
- name: KUBERNETES_CLUSTER_DOMAIN
|
- name: KUBERNETES_CLUSTER_DOMAIN
|
||||||
value: {{ quote .Values.kubernetesClusterDomain }}
|
value: {{ quote .Values.kubernetesClusterDomain }}
|
||||||
image: {{ .Values.sa.manager.image.repository }}:{{ .Values.sa.manager.image.tag
|
- name: WORKER_IMAGE
|
||||||
| default .Chart.AppVersion }}
|
value: {{ include "chart.workerImage" . }}
|
||||||
|
image: {{ .Values.images.operator.repository }}:{{ .Values.images.operator.tag | default .Chart.AppVersion }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
@@ -46,8 +47,7 @@ spec:
|
|||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
resources: {{- toYaml .Values.sa.manager.resources | nindent 10 }}
|
resources: {{- toYaml .Values.sa.manager.resources | nindent 10 }}
|
||||||
securityContext: {{- toYaml .Values.sa.manager.containerSecurityContext | nindent
|
securityContext: {{- toYaml .Values.sa.manager.containerSecurityContext | nindent 10 }}
|
||||||
10 }}
|
|
||||||
securityContext: {{- toYaml .Values.sa.podSecurityContext | nindent 8 }}
|
securityContext: {{- toYaml .Values.sa.podSecurityContext | nindent 8 }}
|
||||||
serviceAccountName: {{ include "chart.fullname" . }}-sa
|
serviceAccountName: {{ include "chart.fullname" . }}-sa
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
+7
-3
@@ -1,4 +1,11 @@
|
|||||||
kubernetesClusterDomain: cluster.local
|
kubernetesClusterDomain: cluster.local
|
||||||
|
images:
|
||||||
|
operator:
|
||||||
|
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator
|
||||||
|
tag: 0.5.47
|
||||||
|
worker:
|
||||||
|
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-worker
|
||||||
|
tag: 0.5.47
|
||||||
sa:
|
sa:
|
||||||
manager:
|
manager:
|
||||||
args:
|
args:
|
||||||
@@ -10,9 +17,6 @@ sa:
|
|||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
image:
|
|
||||||
repository: ghcr.io/lukaszraczylo/kubernetes-images-sync-operator
|
|
||||||
tag: 0.2.44
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
package shared
|
package shared
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var BACKUP_JOB_IMAGE = "ghcr.io/lukaszraczylo/kubernetes-images-sync-worker:1.0.2"
|
var BACKUP_JOB_IMAGE = getWorkerImage()
|
||||||
|
|
||||||
|
func getWorkerImage() string {
|
||||||
|
if img := os.Getenv("WORKER_IMAGE"); img != "" {
|
||||||
|
return img
|
||||||
|
}
|
||||||
|
return "ghcr.io/lukaszraczylo/kubernetes-images-sync-worker:1.0.2" // fallback
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// AVAILABLE STATUSES
|
// AVAILABLE STATUSES
|
||||||
|
|||||||
Reference in New Issue
Block a user