Skip to content

Commit

Permalink
fix: Add gh webhook secret (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 authored Oct 10, 2024
1 parent 577e64e commit f2d25f7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions charts/ctrlplane/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: webservice
repository: file://charts/webservice
version: 0.1.3
version: 0.1.4
- name: job-policy-checker
repository: file://charts/job-policy-checker
version: 0.1.5
Expand All @@ -10,9 +10,9 @@ dependencies:
version: 0.1.6
- name: event-worker
repository: file://charts/event-worker
version: 0.1.6
version: 0.1.7
- name: otel
repository: file://charts/otel
version: 0.1.0
digest: sha256:a787c72024ab9ccde1b53b471ea5e8c23583f20649e8ae9bd9c48bcbc3a835f6
generated: "2024-09-21T23:19:52.598333-04:00"
digest: sha256:c3b1f8393e0aeb6e9250b0750006c46660110dffc60f51f579b6ea7903d4270c
generated: "2024-10-09T18:31:41.82059-07:00"
2 changes: 1 addition & 1 deletion charts/ctrlplane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: ctrlplane
description: Ctrlplane Helm chart for Kubernetes
type: application
version: 0.1.31
version: 0.1.32
appVersion: "1.16.0"

maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/ctrlplane/charts/event-worker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: event-worker
description: A Helm chart for Kubernetes
type: application
version: 0.1.6
version: 0.1.7
appVersion: "1.16.0"
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ spec:
secretKeyRef:
name: {{ .secretRef }}
key: GITHUB_BOT_CLIENT_SECRET
optional: true
- name: GITHUB_BOT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ .secretRef }}
key: GITHUB_BOT_PRIVATE_KEY
optional: true
- name: GITHUB_BOT_NAME
value: {{ .name }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/ctrlplane/charts/webservice/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: webservice
description: A Helm chart for Kubernetes
type: application
version: 0.1.3
version: 0.1.4
appVersion: "1.16.0"
8 changes: 8 additions & 0 deletions charts/ctrlplane/charts/webservice/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,19 @@ spec:
secretKeyRef:
name: {{ .secretRef }}
key: GITHUB_BOT_CLIENT_SECRET
optional: true
- name: GITHUB_BOT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ .secretRef }}
key: GITHUB_BOT_PRIVATE_KEY
optional: true
- name: GITHUB_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: {{ .secretRef }}
key: GITHUB_WEBHOOK_SECRET
optional: true
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://{{ $.Release.Name }}-otel:4318
{{- end }}
Expand Down
7 changes: 6 additions & 1 deletion charts/ctrlplane/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ metadata:
data:
POSTGRES_URL: {{ include "ctrlplane.postgresqlUrl" . | b64enc }}
REDIS_URL: {{ include "ctrlplane.redisUrl" . | b64enc }}
{{- if .Values.global.integrations.github.bot}}
{{- if .Values.global.integrations.github.bot.clientSecret }}
GITHUB_BOT_CLIENT_SECRET: {{ .Values.global.integrations.github.bot.clientSecret | b64enc }}
{{- end }}
{{- if .Values.global.integrations.github.bot.privateKey }}
GITHUB_BOT_PRIVATE_KEY: {{ .Values.global.integrations.github.bot.privateKey | b64enc }}
{{- end }}
{{- if .Values.global.integrations.github.webhookSecret }}
GITHUB_WEBHOOK_SECRET: {{ .Values.global.integrations.github.webhookSecret | b64enc }}
{{- end }}
1 change: 1 addition & 0 deletions charts/ctrlplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ global:
appId: ""
clientSecret: ""
privateKey: ""
webhookSecret: ""

webservice:
install: true
Expand Down

0 comments on commit f2d25f7

Please sign in to comment.