refactor: reorganize GitOps control plane

This commit is contained in:
donghyeon-ka
2026-07-25 23:55:31 +09:00
parent d507ac6ee9
commit 293ee6fc97
191 changed files with 7046 additions and 9034 deletions
@@ -0,0 +1,15 @@
ui = true
disable_mlock = true
api_addr = "http://vault.vault.svc.cluster.local:8200"
cluster_addr = "http://vault.vault.svc.cluster.local:8201"
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "0.0.0.0:8201"
tls_disable = 1
}
storage "raft" {
path = "/vault/data"
node_id = "vault-dev-0"
}
@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- vault-serviceaccount.yaml
- vault-operator-serviceaccount.yaml
- vault-auth-delegator.clusterrolebinding.yaml
- vault-pvc.yaml
- vault-service.yaml
- vault-deployment.yaml
configMapGenerator:
- name: vault-config
files:
- files/vault/vault.hcl
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: vault-server-auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: vault-server
namespace: vault
@@ -0,0 +1,83 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vault
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: vault
template:
metadata:
labels:
app: vault
spec:
serviceAccountName: vault-server
containers:
- name: vault
image: hashicorp/vault:1.18.5@sha256:750bb37c1638fa194ab37053a81618c61bb0491ddec6fccac87c07a8e6cd8166
command:
- /bin/sh
- -ec
env:
- name: VAULT_ADDR
value: http://127.0.0.1:8200
args:
- |
cp /vault/config/vault.hcl /tmp/vault.hcl
exec vault server -config=/tmp/vault.hcl
ports:
- containerPort: 8200
name: http
- containerPort: 8201
name: cluster
volumeMounts:
- name: vault-config
mountPath: /vault/config
readOnly: true
- name: vault-data
mountPath: /vault/data
readinessProbe:
exec:
command:
- sh
- -c
- vault status -address=http://127.0.0.1:8200 >/dev/null 2>&1
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
exec:
command:
- sh
- -c
- vault status -address=http://127.0.0.1:8200 >/dev/null 2>&1; code=$?; [ "$code" -eq 0 ] || [ "$code" -eq 2 ]
initialDelaySeconds: 20
periodSeconds: 15
timeoutSeconds: 5
startupProbe:
exec:
command:
- sh
- -c
- vault status -address=http://127.0.0.1:8200 >/dev/null 2>&1; code=$?; [ "$code" -eq 0 ] || [ "$code" -eq 2 ]
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 30
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
volumes:
- name: vault-config
configMap:
name: vault-config
defaultMode: 0555
- name: vault-data
persistentVolumeClaim:
claimName: vault-data
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: vault-operator
automountServiceAccountToken: false
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vault-data
annotations:
argocd.argoproj.io/sync-options: Prune=false
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: vault
spec:
selector:
app: vault
ports:
- name: http
port: 8200
targetPort: 8200
- name: cluster
port: 8201
targetPort: 8201
type: ClusterIP
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: vault-server