Skip to content

Commit

Permalink
Adapt chart
Browse files Browse the repository at this point in the history
  • Loading branch information
damsien committed May 31, 2024
1 parent 7157e4d commit 31907b9
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 20 deletions.
6 changes: 3 additions & 3 deletions chart/0.0.1/templates/certmanager/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ metadata:
name: operator-webhook-cert
spec:
dnsNames:
- {{ .Values.webhook.services.crd }}.{{ .Release.Namespace }}.svc
- {{ .Values.webhook.services.crd }}.{{ .Release.Namespace }}.svc.cluster.local
- webhook-crd-service.{{ .Release.Namespace }}.svc
- webhook-crd-service.{{ .Release.Namespace }}.svc.cluster.local
- webhook-pusher-service.{{ .Release.Namespace }}.svc
- webhook-pusher-service.{{ .Release.Namespace }}.svc.cluster.local
issuerRef:
kind: Issuer
name: {{ .Release.Name }}-selfsigned-issuer
secretName: {{ .Values.webhook.certificate.secret }}
secretName: {{ .Values.webhook.certmanager.certificate.secret }}
{{- end }}
4 changes: 3 additions & 1 deletion chart/0.0.1/templates/config/bitbucket-configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if eq .Values.configuration.bitbucket true }}
apiVersion: v1
kind: ConfigMap
metadata:
name: bitbucket.org
data:
authenticationEndpoint: https://api.bitbucket.org/2.0/user
authenticationEndpoint: https://api.bitbucket.org/2.0/user
{{- end }}
4 changes: 3 additions & 1 deletion chart/0.0.1/templates/config/github-configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if eq .Values.configuration.github true }}
apiVersion: v1
kind: ConfigMap
metadata:
name: github.com
data:
authenticationEndpoint: https://api.github.com/user
authenticationEndpoint: https://api.github.com/user
{{- end }}
4 changes: 3 additions & 1 deletion chart/0.0.1/templates/config/gitlab-configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if eq .Values.configuration.gitlab true }}
apiVersion: v1
kind: ConfigMap
metadata:
name: gitlab.com
data:
authenticationEndpoint: https://gitlab.com/api/v4/user
authenticationEndpoint: https://gitlab.com/api/v4/user
{{- end }}
4 changes: 2 additions & 2 deletions chart/0.0.1/templates/controller/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address={{ .Values.controller.metrics.bindAddress }}"
{{- end }}
image: {{ .Values.imagePrefix }}/{{ .Chart.Name }}:{{ .Chart.Version }}
image: {{ .Values.controller.imagePrefix }}/{{ .Chart.Name }}:{{ .Chart.Version }}
env:
- name: MANAGER_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -87,4 +87,4 @@ spec:
- name: cert
secret:
defaultMode: 420
secretName: {{ .Values.webhook.certificate.secret }}
secretName: {{ .Values.webhook.certmanager.certificate.secret }}
6 changes: 4 additions & 2 deletions chart/0.0.1/templates/crd/kgio.dams.kgio_gitremotes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
spec:
description: GitRemoteSpec defines the desired state of GitRemote
properties:
customGitProviderConfigRef:
customGitServerConfigRef:
description: |-
Reference to a ConfigMap to configuration the behavior of the GitRemote connexion with the distant server
Expand Down Expand Up @@ -92,6 +92,8 @@ spec:
type: string
gitBaseDomainFQDN:
type: string
insecureSkipTlsVerify:
type: boolean
secretRef:
description: |-
SecretReference represents a Secret Reference. It has enough information to retrieve secret
Expand Down Expand Up @@ -124,7 +126,7 @@ spec:
status:
type: string
type: object
gitProviderConfiguration:
gitServerConfiguration:
properties:
authenticationEndpoint:
type: string
Expand Down
4 changes: 2 additions & 2 deletions chart/0.0.1/templates/webhook/webhook-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ kind: Service
metadata:
labels:
app.kubernetes.io/name: service
app.kubernetes.io/instance: {{ .Values.webhook.services.crd }}
app.kubernetes.io/instance: webhook-crd-service
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
name: {{ .Values.webhook.services.crd }}
name: webhook-crd-service
spec:
ports:
- port: 443
Expand Down
4 changes: 2 additions & 2 deletions chart/0.0.1/templates/webhook/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ .Values.webhook.services.crd }}
name: webhook-crd-service
namespace: {{ .Release.Namespace }}
path: /validate-kgio-dams-kgio-v1-gitremote
failurePolicy: Fail
Expand All @@ -32,7 +32,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ .Values.webhook.services.crd }}
name: webhook-crd-service
namespace: {{ .Release.Namespace }}
path: /validate-kgio-dams-kgio-v1-resourcesinterceptor
failurePolicy: Fail
Expand Down
14 changes: 8 additions & 6 deletions chart/0.0.1/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
webhook:
certmanager:
enable: true
certificate:
name: webhook-cert
secret: webhook-server-cert
services:
crd: webhook-crd-service
certificate:
name: webhook-cert
secret: webhook-server-cert

controller:
imagePrefix: ghcr.io/damsien
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
Expand Down Expand Up @@ -57,4 +56,7 @@ monitoring:

installCRD: true

imagePrefix: ghcr.io/damsien
configuration:
gitlab: true
github: true
bitbucket: true

0 comments on commit 31907b9

Please sign in to comment.