WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3ab398c

Browse files
committed
Unify infisical secret resources
1 parent 4bda155 commit 3ab398c

File tree

8 files changed

+32
-23
lines changed

8 files changed

+32
-23
lines changed

apps/debezium/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
apiVersion: v2
22
name: debezium
33
version: 1.0.0
4+
dependencies:
5+
- name: infisical-secret
6+
version: 1.0.0
7+
repository: file://../../common/infisical-secret

apps/debezium/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
infisical-secret:
2+
name: debezium

common/infisical-secret/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: infisical-secret
3+
version: 1.0.0
4+
type: library
5+
description: "Common chart for reusing infisical secret resources"
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
{{ if .Values.infisical.enabled }}
12
apiVersion: secrets.infisical.com/v1alpha1
23
kind: InfisicalSecret
34
metadata:
4-
name: debezium
5-
namespace: faf-apps
5+
name: {{ .Values.name }}
6+
namespace: {{ .Values.targetNamespace }}
67
spec:
78
authentication:
89
universalAuth:
910
credentialsRef:
1011
secretName: infisical-machine-identity
11-
secretNamespace: faf-ops
12+
secretNamespace: {{ .Values.secretNamespace }}
1213
secretsScope:
1314
projectSlug: {{.Values.infisical.projectSlug}}
1415
envSlug: {{.Values.infisical.envSlug}}
15-
secretsPath: "/debezium"
16+
secretsPath: {{ coalesce .Values.overrideSecretPath .Values.name }}
1617
managedSecretReference:
17-
secretName: debezium
18-
secretNamespace: faf-apps
18+
secretName: {{ .Values.name }}
19+
secretNamespace: {{ .Values.targetNamespace }}
1920
creationPolicy: "Owner"
20-
21+
{{- end }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: null # Define your own!
2+
overrideSecretPath: null # Optional, if name != secretPath
3+
targetNamespace: faf-apps
4+
secretNamespace: faf-ops

config/local.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
hostName: "localhost"
2+
environment: "local"
3+
baseDomain: "localhost"
4+
infisical:
5+
enabled: false
6+
traefik:
7+
tlsStoreSecret: "cloudflare-faf-com"

config/prod.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
hostName: "fafprod3"
22
environment: "prod"
33
infisical:
4+
enabled: true
45
projectSlug: "k3s-cluster-zj-th"
56
envSlug: "prod"
67
baseDomain: "faforever.com"
78
traefik:
89
tlsStoreSecret: "cloudflare-faf-com"
9-
zfs:
10-
nodeId: "fafprod3"
11-
poolName: "tank/faf"
12-
datasetPrefix: "k8s-"
13-
# On NixOS, we need to declare the ZFS binary path explicitly
14-
zfs-localpv:
15-
zfs:
16-
bin: "/run/current-system/sw/bin/zfs"

config/test.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
hostName: "faftest2"
22
environment: "test"
33
infisical:
4+
enabled: true
45
projectSlug: "k3s-cluster-zj-th"
56
envSlug: "test"
67
baseDomain: "faforever.xyz"
78
traefik:
89
tlsStoreSecret: "cloudflare-faf-xyz"
9-
zfs:
10-
nodeId: "faftest2"
11-
poolName: "tank/faf"
12-
datasetPrefix: ""
13-
# On NixOS, we need to declare the ZFS binary path explicitly
14-
zfs-localpv:
15-
zfs:
16-
bin: "/run/current-system/sw/bin/zfs"

0 commit comments

Comments
 (0)