Skip to content

Commit 22053a1

Browse files
committed
feat:kspos for argocd
1 parent abd1a12 commit 22053a1

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

‎argocd/kustomization.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resources:
2+
- ingress.yaml
3+
- repo-server-pahch.yaml
4+
5+
generatorOptions:
6+
disableNameSuffixHash: true
7+
8+
configMapGenerator:
9+
- name: argocd-cm
10+
behavior: merge
11+
literals:
12+
- kustomize.buildOptions=--enable-alpha-plugins --enable-exec
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: argocd-repo-server
5+
spec:
6+
replicas: 2
7+
template:
8+
spec:
9+
volumes:
10+
- name: kustomize-plugins
11+
emptyDir: {}
12+
- name: sops-age
13+
secret:
14+
secretName: sops-age-key
15+
initContainers:
16+
- name: install-ksops-sops
17+
image: alpine:3.20
18+
command: ["/bin/sh","-c"]
19+
args: |
20+
set -eu
21+
apk add --no-cache curl
22+
KSOPS_VER="4.4.0"
23+
mkdir -p /plugins/viaduct.ai/v1/ksops
24+
curl -L -o /plugins/viaduct.ai/v1/ksops/ksops \
25+
"https://github.com/viaduct-ai/kustomize-sops/releases/download/v${KSOPS_VER}/ksops_${KSOPS_VER}_linux_amd64"
26+
chmod +x /plugins/viaduct.ai/v1/ksops/ksops
27+
SOPS_VER="3.11.0"
28+
curl -L -o /usr/local/bin/sops \
29+
"https://github.com/getsops/sops/releases/download/v${SOPS_VER}/sops-v${SOPS_VER}.linux.amd64"
30+
chmod +x /usr/local/bin/sops
31+
volumeMounts:
32+
- name: kustomize-plugins
33+
mountPath: /plugins
34+
containers:
35+
- name: argocd-repo-server
36+
env:
37+
- name: XDG_CONFIG_HOME
38+
value: /home/argocd/.config
39+
- name: KUSTOMIZE_PLUGIN_HOME
40+
value: /home/argocd/.config/kustomize/plugin
41+
- name: SOPS_AGE_KEY_FILE
42+
value: /home/argocd/.config/sops/age/keys.txt
43+
volumeMounts:
44+
- name: kustomize-plugins
45+
mountPath: /home/argocd/.config/kustomize/plugin
46+
- name: sops-age
47+
mountPath: /home/argocd/.config/sops/age
48+
readOnly: true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: viaduct.ai/v1
2+
kind: ksops
3+
metadata:
4+
name: ksops-config
5+
annotations:
6+
config.kubernetes.io/function: |
7+
exec:
8+
path: ksops
9+
files:
10+
- secret.yaml

‎cloudflared/kustomize.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
generators:
5+
- ksops-generator.yaml
6+
7+
resources:
8+
- deployment.yaml
9+
- config.yaml
10+
- secret.yaml

0 commit comments

Comments
 (0)