refactor: 폴더 구조 변경

This commit is contained in:
donghyeon-ka
2026-08-02 00:22:19 +09:00
parent f9c463f87a
commit be2f8e4863
1869 changed files with 4565 additions and 295591 deletions
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: vault-tokenreview-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: vault
namespace: mnt
+21
View File
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: vault-config
data:
vault.hcl: |
ui = true
disable_mlock = true
storage "file" {
path = "/vault/data"
}
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "0.0.0.0:8201"
tls_disable = 1
}
api_addr = "http://vault:8200"
cluster_addr = "http://vault:8201"
+20
View File
@@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- serviceaccount.yaml
- clusterrolebinding.yaml
- configmap.yaml
- service.yaml
- statefulset.yaml
labels:
- pairs:
app.kubernetes.io/name: vault
app.kubernetes.io/instance: vault
app.kubernetes.io/version: "1.17.2"
app.kubernetes.io/component: secret-management
app.kubernetes.io/part-of: security-platform
app.kubernetes.io/managed-by: kustomize
includeSelectors: false
includeTemplates: true
+20
View File
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: vault
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: vault
app.kubernetes.io/instance: vault
ports:
- name: http
port: 8200
targetPort: http
protocol: TCP
appProtocol: http
- name: cluster
port: 8201
targetPort: cluster
protocol: TCP
appProtocol: http
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: vault
+128
View File
@@ -0,0 +1,128 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vault
spec:
replicas: 1
serviceName: vault
podManagementPolicy: OrderedReady
updateStrategy:
type: RollingUpdate
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
selector:
matchLabels:
app.kubernetes.io/name: vault
app.kubernetes.io/instance: vault
template:
metadata:
labels:
app.kubernetes.io/name: vault
app.kubernetes.io/instance: vault
spec:
serviceAccountName: vault
automountServiceAccountToken: true
terminationGracePeriodSeconds: 60
securityContext:
runAsNonRoot: true
runAsUser: 100
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: vault
image: hashicorp/vault:1.17.2
imagePullPolicy: IfNotPresent
command:
- vault
- server
- -config=/vault/config/vault.hcl
ports:
- name: http
containerPort: 8200
protocol: TCP
- name: cluster
containerPort: 8201
protocol: TCP
env:
- name: VAULT_ADDR
value: "http://127.0.0.1:8200"
- name: VAULT_API_ADDR
value: "http://vault:8200"
- name: SKIP_SETCAP
value: "true"
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
memory: 512Mi
startupProbe:
httpGet:
path: /v1/sys/health?standbyok=true&sealedcode=200&uninitcode=200
port: http
periodSeconds: 5
failureThreshold: 30
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /v1/sys/health?standbyok=true&sealedcode=503&uninitcode=503
port: http
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /v1/sys/health?standbyok=true&sealedcode=200&uninitcode=200
port: http
periodSeconds: 30
failureThreshold: 3
timeoutSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 100
runAsGroup: 1000
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: data
mountPath: /vault/data
- name: config
mountPath: /vault/config
readOnly: true
- name: tmp
mountPath: /tmp
- name: home
mountPath: /home/vault
volumes:
- name: config
configMap:
name: vault-config
- name: tmp
emptyDir:
medium: Memory
sizeLimit: 64Mi
- name: home
emptyDir:
medium: Memory
sizeLimit: 64Mi
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
storageClassName: replace-in-overlay
volumeMode: Filesystem
resources:
requests:
storage: 5Gi