Set default helm chart image tag to null #375

Closed
opened 2026-04-05 16:16:19 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @akalitenya on 12/7/2025

This PR changes default image tag to null, so AppVersion will be used instead of "latest".

Issue - If the user does not explicitly specify a Docker image tag, the Helm chart uses the "latest" tag.

helm template oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace --version 1.47.1 > _templates/postgresus-1-47-1.yaml

---
# Source: postgresus/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-postgresus-service
  namespace: postgresus
  labels:
    helm.sh/chart: postgresus-1.47.1
    app.kubernetes.io/name: postgresus
    app.kubernetes.io/instance: release-name
    app: postgresus
    app.kubernetes.io/version: "v1.47.1"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - port: 4005
      targetPort: 4005
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: postgresus
    app.kubernetes.io/instance: release-name
    app: postgresus
---
# Source: postgresus/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: release-name-postgresus-headless
  namespace: postgresus
  labels:
    helm.sh/chart: postgresus-1.47.1
    app.kubernetes.io/name: postgresus
    app.kubernetes.io/instance: release-name
    app: postgresus
    app.kubernetes.io/version: "v1.47.1"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - port: 4005
      targetPort: 4005
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: postgresus
    app.kubernetes.io/instance: release-name
    app: postgresus
---
# Source: postgresus/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: release-name-postgresus
  namespace: postgresus
  labels:
    helm.sh/chart: postgresus-1.47.1
    app.kubernetes.io/name: postgresus
    app.kubernetes.io/instance: release-name
    app: postgresus
    app.kubernetes.io/version: "v1.47.1"
    app.kubernetes.io/managed-by: Helm
spec:
  serviceName: release-name-postgresus-headless
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: postgresus
      app.kubernetes.io/instance: release-name
      app: postgresus
  template:
    metadata:
      annotations:
      labels:
        app.kubernetes.io/name: postgresus
        app.kubernetes.io/instance: release-name
        app: postgresus
    spec:
      containers:
        - name: postgresus
          image: "rostislavdugin/postgresus:latest"
          imagePullPolicy: Always
          ports:
            - name: http
              containerPort: 4005
              protocol: TCP
          volumeMounts:
            - name: postgresus-storage
              mountPath: /postgresus-data
          resources:
            limits:
              cpu: 500m
              memory: 1Gi
            requests:
              cpu: 500m
              memory: 1Gi
          livenessProbe:
            httpGet:
              path: /api/v1/system/health
              port: 4005
            initialDelaySeconds: 30
            periodSeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /api/v1/system/health
              port: 4005
            initialDelaySeconds: 10
            periodSeconds: 5
            timeoutSeconds: 3
            failureThreshold: 3
  volumeClaimTemplates:
    - metadata:
        name: postgresus-storage
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
  updateStrategy:
    rollingUpdate:
      partition: 0
    type: RollingUpdate

*Originally created by @akalitenya on 12/7/2025* This PR changes default image tag to null, so AppVersion will be used instead of "latest". Issue - If the user does not explicitly specify a Docker image tag, the Helm chart uses the "latest" tag. helm template oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace --version 1.47.1 > _templates/postgresus-1-47-1.yaml ```yaml --- # Source: postgresus/templates/service.yaml apiVersion: v1 kind: Service metadata: name: release-name-postgresus-service namespace: postgresus labels: helm.sh/chart: postgresus-1.47.1 app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus app.kubernetes.io/version: "v1.47.1" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP ports: - port: 4005 targetPort: 4005 protocol: TCP name: http selector: app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus --- # Source: postgresus/templates/service.yaml apiVersion: v1 kind: Service metadata: name: release-name-postgresus-headless namespace: postgresus labels: helm.sh/chart: postgresus-1.47.1 app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus app.kubernetes.io/version: "v1.47.1" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP clusterIP: None ports: - port: 4005 targetPort: 4005 protocol: TCP name: http selector: app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus --- # Source: postgresus/templates/statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: release-name-postgresus namespace: postgresus labels: helm.sh/chart: postgresus-1.47.1 app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus app.kubernetes.io/version: "v1.47.1" app.kubernetes.io/managed-by: Helm spec: serviceName: release-name-postgresus-headless replicas: 1 selector: matchLabels: app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus template: metadata: annotations: labels: app.kubernetes.io/name: postgresus app.kubernetes.io/instance: release-name app: postgresus spec: containers: - name: postgresus image: "rostislavdugin/postgresus:latest" imagePullPolicy: Always ports: - name: http containerPort: 4005 protocol: TCP volumeMounts: - name: postgresus-storage mountPath: /postgresus-data resources: limits: cpu: 500m memory: 1Gi requests: cpu: 500m memory: 1Gi livenessProbe: httpGet: path: /api/v1/system/health port: 4005 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /api/v1/system/health port: 4005 initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 volumeClaimTemplates: - metadata: name: postgresus-storage spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi updateStrategy: rollingUpdate: partition: 0 type: RollingUpdate ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/databasus#375