Skip to content

Commit

Permalink
fix: add datadog service label value to chart
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmdm committed May 10, 2024
1 parent fa34178 commit fe50929
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 0 deletions.
1 change: 1 addition & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- end }}
labels:
{{- include "joy-generator.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}{{ toYaml .Values.podLabels | nindent 8 }}{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
124 changes: 124 additions & 0 deletions chart/tests/with-additional-labels/expected.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
# Source: joy-generator/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: my-release-joy-generator-config
stringData:
PLUGIN_TOKEN: '@very!l0ngands3curet0ken'
---
# Source: joy-generator/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: my-release-joy-generator-github-app-key
stringData:
githubApp.pem: |
FOOBARLOREMISPUM
---
# Source: joy-generator/templates/argocd-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: my-release-joy-generator-config
data:
token: "$my-release-joy-generator-config:PLUGIN_TOKEN"
baseUrl: "http://my-release-joy-generator"
---
# Source: joy-generator/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: my-release-joy-generator
labels:
helm.sh/chart: joy-generator-1.0.0
app.kubernetes.io/name: joy-generator
app.kubernetes.io/instance: my-release
app.kubernetes.io/version: "1.0.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: joy-generator
app.kubernetes.io/instance: my-release
---
# Source: joy-generator/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-release-joy-generator
labels:
helm.sh/chart: joy-generator-1.0.0
app.kubernetes.io/name: joy-generator
app.kubernetes.io/instance: my-release
app.kubernetes.io/version: "1.0.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: joy-generator
app.kubernetes.io/instance: my-release
template:
metadata:
labels:
app.kubernetes.io/name: joy-generator
app.kubernetes.io/instance: my-release
service-name: joy-generator-chart-test
spec:
securityContext:
{}
volumes:
- name: catalog-dir
emptyDir: {}
- name: github-app-private-key
secret:
secretName: my-release-joy-generator-github-app-key
containers:
- name: joy-generator
securityContext:
{}
image: "ghcr.io/nestoca/joy-generator:0.1.2"
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /tmp/catalog
name: catalog-dir
- mountPath: /etc/joy/config
name: github-app-private-key
env:
- name: CATALOG_DIR
value: "/tmp/catalog"
- name: CATALOG_URL
value: "https://github.com/example/foobar.git"
- name: GH_APP_ID
value: "123"
- name: GH_APP_INSTALLATION_ID
value: "666"
- name: GRACE_PERIOD
value: "10s"
- name: PORT
value: ":8080"
- name: GH_APP_PRIVATE_KEY_PATH
value: /etc/joy/config/githubApp.pem
envFrom:
- secretRef:
name: my-release-joy-generator-config
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /api/v1/health
port: http
readinessProbe:
httpGet:
path: /api/v1/readiness
port: http
resources:
{}
23 changes: 23 additions & 0 deletions chart/tests/with-additional-labels/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration settings for the joy-generator instance
env:
GH_APP_ID: "123"
GH_APP_INSTALLATION_ID: "666"

# The HTTPS Git URL of your joy catalog
CATALOG_URL: "https://github.com/example/foobar.git"

secretEnv:
values:
PLUGIN_TOKEN: "@very!l0ngands3curet0ken"

# The GitHub app configuration.
# Required if githubToken is not set.
# The GitHub application private key (PEM format)
githubAppPrivateKey: |
FOOBARLOREMISPUM
image:
tag: 0.1.2

podLabels:
service-name: joy-generator-chart-test

0 comments on commit fe50929

Please sign in to comment.