From e8889c5b7adac038b187dd28ab49944b131b9323 Mon Sep 17 00:00:00 2001 From: Lifosmin Simon Date: Thu, 28 Aug 2025 11:20:08 +0700 Subject: [PATCH 1/2] chore: volume type --- helm_template_debug_output.yaml | 281 ++++++++++++++++++++++++++ helm_template_output.yaml | 0 stable/tbot/templates/deployment.yaml | 1 - 3 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 helm_template_debug_output.yaml create mode 100644 helm_template_output.yaml diff --git a/helm_template_debug_output.yaml b/helm_template_debug_output.yaml new file mode 100644 index 00000000..346c191f --- /dev/null +++ b/helm_template_debug_output.yaml @@ -0,0 +1,281 @@ +--- +# Source: app/templates/otelcollector-configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: cron-app-otelcollector + labels: + helm.sh/chart: app-0.6.9 + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + app.kubernetes.io/managed-by: Helm +data: + config.yaml: |- + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +# Source: app/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: cron-app + labels: + helm.sh/chart: app-0.6.9 + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: tcp + protocol: TCP + name: tcp + selector: + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron +--- +# Source: app/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cron-app + labels: + helm.sh/chart: app-0.6.9 + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + template: + metadata: + annotations: + checksum/config: 47b5ef5284a803bdabbede14fd1ef1d053574e2a0a903663ce8eb4c86599e2d1 + labels: + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + spec: + securityContext: + {} + containers: + - name: app + securityContext: + {} + image: ":latest" + imagePullPolicy: IfNotPresent + ports: + - name: tcp + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: tcp + readinessProbe: + httpGet: + path: / + port: tcp + resources: + {} + command: + [] + args: + [] + volumeMounts: + null + envFrom: + - configMapRef: + name: "cron-app" + - name: otel-collector-sidecar + image: otel/opentelemetry-collector-contrib:0.89.0 + imagePullPolicy: IfNotPresent + args: + - "--config=/etc/otelcollector/config.yaml" + ports: + - containerPort: 1888 + name: pprof + protocol: TCP + - containerPort: 8888 + name: prometheusself + protocol: TCP + - containerPort: 8889 + name: prometheus + protocol: TCP + - containerPort: 13133 + name: healthcheck + protocol: TCP + - containerPort: 4317 + name: otlpgrpcrecv + protocol: TCP + - containerPort: 4318 + name: otlphttprecv + protocol: TCP + - containerPort: 55679 + name: zpages + protocol: TCP + env: + - name: K8S_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: K8S_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: K8S_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: K8S_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: OTEL_RESOURCE_ATTRIBUTES + value: | + k8s.deployment.name=cron-app,k8s.namespace.name=$(K8S_POD_NAMESPACE),k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME),k8s.pod.ip=$(K8S_POD_IP) + volumeMounts: + - name: otelcollector-conf + mountPath: /etc/otelcollector/ + readinessProbe: + httpGet: + path: /readyz + port: 13133 + initialDelaySeconds: 15 + periodSeconds: 5 + livenessProbe: + httpGet: + path: /healthz + port: 13133 + initialDelaySeconds: 15 + periodSeconds: 5 + volumes: + - name: otelcollector-conf + configMap: + name: cron-app-otelcollector +--- +# Source: app/templates/cron.yaml +apiVersion: batch/v1 +kind: CronJob +metadata: + name: "cron-app-0-cronJob1" + namespace: default + labels: + helm.sh/chart: app-0.6.9 + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + app.kubernetes.io/managed-by: Helm +spec: + schedule: "0 0 * * *" + jobTemplate: + spec: + backoffLimit: 4 + template: + metadata: + labels: + app.kubernetes.io/name: app + app.kubernetes.io/instance: cron + spec: + containers: + - name: cronJob1 + image: ":latest" + imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - | + app + pkill -SIGTERM otelcol-contrib + args: + - startJob + envFrom: + - configMapRef: + name: cron-app + resources: + null + - name: otel-collector-sidecar + image: otel/opentelemetry-collector-contrib:0.89.0 + imagePullPolicy: IfNotPresent + args: + - "--config=/etc/otelcollector/config.yaml" + ports: + - containerPort: 1888 + name: pprof + protocol: TCP + - containerPort: 8888 + name: prometheusself + protocol: TCP + - containerPort: 8889 + name: prometheus + protocol: TCP + - containerPort: 13133 + name: healthcheck + protocol: TCP + - containerPort: 4317 + name: otlpgrpcrecv + protocol: TCP + - containerPort: 4318 + name: otlphttprecv + protocol: TCP + - containerPort: 55679 + name: zpages + protocol: TCP + env: + - name: K8S_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: K8S_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: K8S_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: K8S_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: OTEL_RESOURCE_ATTRIBUTES + value: | + k8s.deployment.name=cronJob1,k8s.namespace.name=$(K8S_POD_NAMESPACE),k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME),k8s.pod.ip=$(K8S_POD_IP) + volumeMounts: + - name: otelcollector-conf + mountPath: /etc/otelcollector/ + + resources: + cronJob1 + + shareProcessNamespace: true + restartPolicy: Never + volumes: + - name: otelcollector-conf + configMap: + name: cron-app-otelcollector +--- +# Source: app/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cron-app" + annotations: + "helm.sh/hook": pre-install,pre-upgrade + "helm.sh/hook-weight": "-5" + "helm.sh/resource-policy": "keep" +data: diff --git a/helm_template_output.yaml b/helm_template_output.yaml new file mode 100644 index 00000000..e69de29b diff --git a/stable/tbot/templates/deployment.yaml b/stable/tbot/templates/deployment.yaml index 25c0fdcd..d8da842a 100644 --- a/stable/tbot/templates/deployment.yaml +++ b/stable/tbot/templates/deployment.yaml @@ -227,7 +227,6 @@ spec: - name: {{ include "app.fullname" . }} configMap: name: {{ template "app.fullname" . }} - emptyDir: {} {{- range $volume := .Values.volumes }} - {{- toYaml $volume | nindent 10 }} {{- end }} From 8b66b154b987ca4f2c8344d55df0563d6400cd18 Mon Sep 17 00:00:00 2001 From: Lifosmin Simon Date: Thu, 28 Aug 2025 11:21:48 +0700 Subject: [PATCH 2/2] chore: volume type --- helm_template_debug_output.yaml | 281 -------------------------------- helm_template_output.yaml | 0 2 files changed, 281 deletions(-) delete mode 100644 helm_template_debug_output.yaml delete mode 100644 helm_template_output.yaml diff --git a/helm_template_debug_output.yaml b/helm_template_debug_output.yaml deleted file mode 100644 index 346c191f..00000000 --- a/helm_template_debug_output.yaml +++ /dev/null @@ -1,281 +0,0 @@ ---- -# Source: app/templates/otelcollector-configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: cron-app-otelcollector - labels: - helm.sh/chart: app-0.6.9 - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - app.kubernetes.io/managed-by: Helm -data: - config.yaml: |- - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] ---- -# Source: app/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: cron-app - labels: - helm.sh/chart: app-0.6.9 - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - app.kubernetes.io/managed-by: Helm -spec: - type: ClusterIP - ports: - - port: 80 - targetPort: tcp - protocol: TCP - name: tcp - selector: - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron ---- -# Source: app/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cron-app - labels: - helm.sh/chart: app-0.6.9 - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - app.kubernetes.io/managed-by: Helm -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - template: - metadata: - annotations: - checksum/config: 47b5ef5284a803bdabbede14fd1ef1d053574e2a0a903663ce8eb4c86599e2d1 - labels: - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - spec: - securityContext: - {} - containers: - - name: app - securityContext: - {} - image: ":latest" - imagePullPolicy: IfNotPresent - ports: - - name: tcp - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: tcp - readinessProbe: - httpGet: - path: / - port: tcp - resources: - {} - command: - [] - args: - [] - volumeMounts: - null - envFrom: - - configMapRef: - name: "cron-app" - - name: otel-collector-sidecar - image: otel/opentelemetry-collector-contrib:0.89.0 - imagePullPolicy: IfNotPresent - args: - - "--config=/etc/otelcollector/config.yaml" - ports: - - containerPort: 1888 - name: pprof - protocol: TCP - - containerPort: 8888 - name: prometheusself - protocol: TCP - - containerPort: 8889 - name: prometheus - protocol: TCP - - containerPort: 13133 - name: healthcheck - protocol: TCP - - containerPort: 4317 - name: otlpgrpcrecv - protocol: TCP - - containerPort: 4318 - name: otlphttprecv - protocol: TCP - - containerPort: 55679 - name: zpages - protocol: TCP - env: - - name: K8S_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: K8S_POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: K8S_POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: K8S_POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: OTEL_RESOURCE_ATTRIBUTES - value: | - k8s.deployment.name=cron-app,k8s.namespace.name=$(K8S_POD_NAMESPACE),k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME),k8s.pod.ip=$(K8S_POD_IP) - volumeMounts: - - name: otelcollector-conf - mountPath: /etc/otelcollector/ - readinessProbe: - httpGet: - path: /readyz - port: 13133 - initialDelaySeconds: 15 - periodSeconds: 5 - livenessProbe: - httpGet: - path: /healthz - port: 13133 - initialDelaySeconds: 15 - periodSeconds: 5 - volumes: - - name: otelcollector-conf - configMap: - name: cron-app-otelcollector ---- -# Source: app/templates/cron.yaml -apiVersion: batch/v1 -kind: CronJob -metadata: - name: "cron-app-0-cronJob1" - namespace: default - labels: - helm.sh/chart: app-0.6.9 - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - app.kubernetes.io/managed-by: Helm -spec: - schedule: "0 0 * * *" - jobTemplate: - spec: - backoffLimit: 4 - template: - metadata: - labels: - app.kubernetes.io/name: app - app.kubernetes.io/instance: cron - spec: - containers: - - name: cronJob1 - image: ":latest" - imagePullPolicy: IfNotPresent - command: - - /bin/sh - - -c - - | - app - pkill -SIGTERM otelcol-contrib - args: - - startJob - envFrom: - - configMapRef: - name: cron-app - resources: - null - - name: otel-collector-sidecar - image: otel/opentelemetry-collector-contrib:0.89.0 - imagePullPolicy: IfNotPresent - args: - - "--config=/etc/otelcollector/config.yaml" - ports: - - containerPort: 1888 - name: pprof - protocol: TCP - - containerPort: 8888 - name: prometheusself - protocol: TCP - - containerPort: 8889 - name: prometheus - protocol: TCP - - containerPort: 13133 - name: healthcheck - protocol: TCP - - containerPort: 4317 - name: otlpgrpcrecv - protocol: TCP - - containerPort: 4318 - name: otlphttprecv - protocol: TCP - - containerPort: 55679 - name: zpages - protocol: TCP - env: - - name: K8S_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: K8S_POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: K8S_POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: K8S_POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: OTEL_RESOURCE_ATTRIBUTES - value: | - k8s.deployment.name=cronJob1,k8s.namespace.name=$(K8S_POD_NAMESPACE),k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME),k8s.pod.ip=$(K8S_POD_IP) - volumeMounts: - - name: otelcollector-conf - mountPath: /etc/otelcollector/ - - resources: - cronJob1 - - shareProcessNamespace: true - restartPolicy: Never - volumes: - - name: otelcollector-conf - configMap: - name: cron-app-otelcollector ---- -# Source: app/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cron-app" - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-weight": "-5" - "helm.sh/resource-policy": "keep" -data: diff --git a/helm_template_output.yaml b/helm_template_output.yaml deleted file mode 100644 index e69de29b..00000000