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

fix: add datadog service label value to chart #42

Merged
merged 1 commit into from
May 10, 2024
Merged
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
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
Loading