Skip to content

Commit 8d8cb5e

Browse files
authored
feat(chart): Move Dex to subchart (#1185)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent ca16d44 commit 8d8cb5e

File tree

20 files changed

+660
-601
lines changed

20 files changed

+660
-601
lines changed

deployment/chainloop/Chart.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ dependencies:
88
- name: vault
99
repository: https://charts.bitnami.com/bitnami
1010
version: 1.4.16
11-
digest: sha256:75494ecf8834d4799490dd6879e073bcf1228967025d7f93abe08d3458f11859
12-
generated: "2024-08-01T13:43:26.111453+02:00"
11+
- name: dex
12+
repository: file://charts/dex
13+
version: 0.0.1
14+
digest: sha256:856d6ca9a125209c6aeb718bdbaa14d61eb542d009d1b7e6f004d5d5d2efd898
15+
generated: "2024-08-02T13:56:45.701274+02:00"

deployment/chainloop/Chart.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Chainloop is an open source software supply chain control plane, a
77

88
type: application
99
# Bump the patch (not minor, not major) version on each change in the Chart Source code
10-
version: 1.86.3
10+
version: 1.86.4
1111
# Do not update appVersion, this is handled automatically by the release process
1212
appVersion: v0.95.3
1313

@@ -25,6 +25,10 @@ dependencies:
2525
name: vault
2626
repository: https://charts.bitnami.com/bitnami
2727
version: 1.4.x
28+
- condition: development
29+
repository: file://charts/dex
30+
name: dex
31+
version: 0.0.1
2832

2933
annotations:
3034
images: |
@@ -34,5 +38,3 @@ annotations:
3438
name: control-plane
3539
- image: ghcr.io/chainloop-dev/chainloop/control-plane-migrations:v0.95.3
3640
name: control-plane-migrations
37-
- image: docker.io/bitnami/dex:2.40.0-debian-12-r1
38-
name: dex
24.7 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 2.20.5
5+
digest: sha256:d887f4d52c98e9524f9eb8be04f987acc240288a9c1cf2653cc1b7c221230ee7
6+
generated: "2024-08-02T13:53:43.065552+02:00"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright Chainloop, Inc. All Rights Reserved.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
4+
apiVersion: v2
5+
name: dex
6+
description: Dex is an identity service that uses OpenID Connect to drive authentication for other apps.
7+
8+
type: application
9+
# Bump the patch (not minor, not major) version on each change in the Chart Source code
10+
version: 0.0.1
11+
# Do not update appVersion, this is handled automatically by the release process
12+
appVersion: v0.0.1
13+
14+
dependencies:
15+
- name: common
16+
repository: https://charts.bitnami.com/bitnami
17+
tags:
18+
- bitnami-common
19+
version: 2.x.x
20+
21+
annotations:
22+
images: |
23+
- image: docker.io/bitnami/dex:2.40.0-debian-12-r1
24+
name: dex

deployment/chainloop/charts/dex/README.md

Whitespace-only changes.
15.7 KB
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{/*
2+
##############################################################################
3+
Dex helpers
4+
##############################################################################
5+
*/}}
6+
7+
{{/*
8+
Return the proper Dex image name
9+
*/}}
10+
{{- define "chainloop.dex.image" -}}
11+
{{ include "common.images.image" (dict "imageRoot" .Values.dex.image "global" .Values.global) }}
12+
{{- end -}}
13+
14+
{{/*
15+
Return the proper service name for Dex
16+
*/}}
17+
{{- define "chainloop.dex" -}}
18+
{{- printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
19+
{{- end -}}
20+
21+
{{/*
22+
Create the name of the service account to use for Dex
23+
*/}}
24+
{{- define "chainloop.dex.serviceAccountName" -}}
25+
{{- if .Values.dex.serviceAccount.create -}}
26+
{{ default (printf "%s" (include "common.names.fullname" .)) .Values.dex.serviceAccount.name | trunc 63 | trimSuffix "-" }}
27+
{{- else -}}
28+
{{ default "default" .Values.dex.serviceAccount.name }}
29+
{{- end -}}
30+
{{- end -}}
31+
32+
{{/*
33+
Chainloop Dex release name
34+
*/}}
35+
{{- define "chainloop.dex.fullname" -}}
36+
{{- printf "%s-%s" (include "common.names.fullname" .) "dex" | trunc 63 | trimSuffix "-" -}}
37+
{{- end -}}

deployment/chainloop/templates/dex/deployment.yaml renamed to deployment/chainloop/charts/dex/templates/deployment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Copyright Chainloop, Inc. All Rights Reserved.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
{{- if .Values.development }}
76
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
87
kind: Deployment
98
metadata:
@@ -34,7 +33,7 @@ spec:
3433
app.kubernetes.io/component: dex
3534
spec:
3635
serviceAccountName: {{ include "chainloop.dex.serviceAccountName" . }}
37-
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.controlplane.image .Values.controlplane.migration.image .Values.dex.image) "context" $) | nindent 6 }}
36+
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.dex.image) "context" $) | nindent 6 }}
3837
automountServiceAccountToken: {{ .Values.dex.automountServiceAccountToken }}
3938
{{- if .Values.dex.hostAliases }}
4039
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.dex.hostAliases "context" $) | nindent 8 }}
@@ -192,4 +191,3 @@ spec:
192191
{{- if .Values.dex.extraVolumes }}
193192
{{- include "common.tplvalues.render" (dict "value" .Values.dex.extraVolumes "context" $) | nindent 8 }}
194193
{{- end }}
195-
{{- end }}

deployment/chainloop/templates/dex/metrics-svc.yaml renamed to deployment/chainloop/charts/dex/templates/metrics-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright Chainloop, Inc. All Rights Reserved.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
{{- if and .Values.development .Values.dex.metrics.enabled }}
6+
{{- if .Values.dex.metrics.enabled }}
77
apiVersion: v1
88
kind: Service
99
metadata:

0 commit comments

Comments
 (0)