diff --git a/deploy/production/README.md b/deploy/production/README.md new file mode 100644 index 0000000..bba926a --- /dev/null +++ b/deploy/production/README.md @@ -0,0 +1,55 @@ +# hyeonworks.com 운영 매니페스트 + +`hyeonworks-prod` namespace의 앱 쪽 객체 정본이다(소유자 결정 2026-11-11: 앱 쪽은 tech-log repo +`deploy/`). 플랫폼 쪽(Namespace, techlog DB Role·Database, 다른 namespace의 NetworkPolicy·Probe· +경보·대시보드)은 platform-core `services/tenants/techlog`가 맡는다. `hyeonworks-secrets` Secret은 +Git 밖에서 만든다. + +| 파일 | 객체 | +| --- | --- | +| `backend-*.yaml` | `techlog-backend` Deployment, Service `techlog-backend`·`techlog-management`, ServiceMonitor, ConfigMap `techlog-logging` | +| `redis-*.yaml` | 세션 저장소 `redis` Deployment·Service(저장 안 함, 재시작하면 로그인이 풀린다) | +| `frontend-*.yaml` | `techlog-frontend` Deployment·Service | +| `ingress.yaml` | `hyeonworks.com` 경로: `/api`·`/oauth2`·`/login`·`/logout` → backend, 나머지 → frontend | +| `network-policies.yaml` | namespace 안 기본 거부와 허용 여섯 | + +## 이미지와 실행 사용자 + +| 컨테이너 | 이미지 | pull | 사용자 | +| --- | --- | --- | --- | +| backend | `git.learn.hyeonworks.com/donghyeon.kang/tech-log-backend:46b1cc7` | `IfNotPresent` | uid 1000(이미지의 `app`), 권한 전부 버림 | +| frontend | `git.learn.hyeonworks.com/donghyeon.kang/tech-log-frontend:7a4e201` | `IfNotPresent` | root(nginx). `allowPrivilegeEscalation: false`만 | +| redis | `redis@sha256:c5d34a98…`(지금 운영이 쓰는 `redis:7-alpine`의 digest) | `IfNotPresent` | uid 999(이미지의 `redis`), 권한 전부 버림 | + +- 예전에는 `imagePullPolicy: Never`로 노드에 직접 넣은 이미지를 썼다. 2026-11-09 디스크 사고 때 + kubelet 이미지 GC가 그 이미지를 지웠고, 다시 받을 곳이 없어 운영이 내려갔다. 이제 Gitea 컨테이너 + 레지스트리에서 다시 받는다. +- 세 파드 모두 `priorityClassName: platform-critical`(platform-core `services/priority-classes`)이고 + seccomp는 `RuntimeDefault`다. +- **frontend non-root는 남은 일이다.** nginx 공식 이미지는 root로 시작해 80번을 열고 worker를 + `nginx`로 내린다. 권한을 버리거나 non-root로 돌리려면 이미지를 비특권 nginx(8080)로 바꾸고 Service + `targetPort`와 probe를 같이 바꿔야 한다. + +## 적용 + +전제(하나라도 없으면 적용하지 않는다): + +1. 두 이미지가 Gitea 레지스트리에 있다. 익명 pull이 되는지 노드에서 확인한다. + `sudo k3s crictl pull git.learn.hyeonworks.com/donghyeon.kang/tech-log-backend:46b1cc7` + (frontend도 같다). 미리 받아 두면 backend(Recreate)가 멈추는 시간이 짧아진다. +2. PriorityClass `platform-critical`이 있다: `kubectl get priorityclass platform-critical`. +3. Secret `hyeonworks-prod/hyeonworks-secrets`가 있다. + +```bash +curl -s -o /dev/null -w '%{http_code}\n' https://hyeonworks.com/ +kubectl diff -k deploy/production +kubectl apply -k deploy/production +kubectl -n hyeonworks-prod rollout status deploy/techlog-backend deploy/techlog-frontend deploy/redis +curl -s -o /dev/null -w '%{http_code}\n' https://hyeonworks.com/ +curl -s -o /dev/null -w '%{http_code}\n' https://hyeonworks.com/api/v1/public/home +``` + +- backend는 `Recreate`라 새 파드가 준비될 때까지 API가 멈춘다(1분 안팎). +- redis가 다시 시작되면 로그인 세션이 모두 풀린다. + +되돌리기: `kubectl -n hyeonworks-prod rollout undo deploy/<이름>`. 그 뒤 이 폴더를 되돌리는 커밋을 만든다. diff --git a/deploy/production/backend-deployment.yaml b/deploy/production/backend-deployment.yaml new file mode 100644 index 0000000..7b06333 --- /dev/null +++ b/deploy/production/backend-deployment.yaml @@ -0,0 +1,189 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: techlog-backend +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: techlog-backend + strategy: + type: Recreate + template: + metadata: + labels: + app: techlog-backend + spec: + automountServiceAccountToken: false + containers: + - env: + - name: SPRING_PROFILES_ACTIVE + value: local + - name: SPRING_DATASOURCE_URL + value: jdbc:postgresql://platform-postgres-rw.platform-data.svc.cluster.local:5432/techlog + - name: SPRING_DATASOURCE_USERNAME + value: techlog + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + key: APP_DB_PASSWORD + name: hyeonworks-secrets + - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME + value: org.postgresql.Driver + - name: SPRING_FLYWAY_ENABLED + value: 'true' + - name: SPRING_JPA_HIBERNATE_DDL_AUTO + value: none + - name: CA_SKELETON_PERSISTENCE_VENDOR + value: postgresql + - name: CA_SKELETON_SECURITY_AUTH_MODE + value: redis-session + - name: CA_SKELETON_SECURITY_SESSION_COOKIE_NAME + value: TECHLOG_SESSION + - name: CA_SKELETON_SECURITY_SESSION_PATH + value: / + - name: CA_SKELETON_SECURITY_SESSION_SECURE + value: 'true' + - name: CA_SKELETON_SECURITY_SESSION_SAME_SITE + value: Lax + - name: APP_REDIS_ENABLED + value: 'true' + - name: APP_REDIS_AUTHENTICATION_ANONYMOUS_ACCESS_ACCEPTED + value: 'true' + - name: SPRING_DATA_REDIS_HOST + value: redis + - name: SPRING_DATA_REDIS_PORT + value: '6379' + - name: SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_KEYCLOAK_ISSUER_URI + value: https://id.learn.hyeonworks.com/realms/prod + - name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_CLIENT_ID + value: tech-log-bff + - name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: TECHLOG_OIDC_CLIENT_SECRET + name: hyeonworks-secrets + - name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_SCOPE + value: openid,profile,email + - name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_AUTHORIZATION_GRANT_TYPE + value: authorization_code + - name: SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_KEYCLOAK_REDIRECT_URI + value: https://hyeonworks.com/login/oauth2/code/keycloak + - name: APP_STUDIO_AUTHOR_ROLE + value: site-admin + - name: APP_SESSION_TIMEOUT + value: 24h + - name: APP_STUDIO_POST_LOGIN_REDIRECT + value: https://hyeonworks.com/studio + - name: APP_SERVER_FORWARD_HEADERS_STRATEGY + value: framework + - name: CA_SKELETON_CORS_ALLOWED_ORIGINS + value: https://hyeonworks.com + - name: CA_SKELETON_OBJECTSTORAGE_BACKEND + value: s3 + - name: CA_SKELETON_OBJECTSTORAGE_ENDPOINT + value: http://minio.object-storage.svc.cluster.local + - name: CA_SKELETON_OBJECTSTORAGE_REGION + value: us-east-1 + - name: CA_SKELETON_OBJECTSTORAGE_PATH_STYLE_ACCESS + value: 'true' + - name: CA_SKELETON_OBJECTSTORAGE_AUTO_CREATE_BUCKET + value: 'false' + - name: CA_SKELETON_OBJECTSTORAGE_BUCKET + valueFrom: + secretKeyRef: + key: S3_BUCKET + name: hyeonworks-secrets + - name: CA_SKELETON_OBJECTSTORAGE_ACCESS_KEY + valueFrom: + secretKeyRef: + key: S3_ACCESS_KEY + name: hyeonworks-secrets + - name: CA_SKELETON_OBJECTSTORAGE_SECRET_KEY + valueFrom: + secretKeyRef: + key: S3_SECRET_KEY + name: hyeonworks-secrets + - name: TZ + value: UTC + - name: MANAGEMENT_ENDPOINT_HEALTH_SHOW_COMPONENTS + value: always + - name: LOGGING_CONFIG + value: /etc/techlog-logging/logback-spring.xml + - name: APP_TRACING_SAMPLE_RATE + value: '0.1' + - name: APP_LOG_LEVEL_APP + value: INFO + - name: APP_LOG_LEVEL_ROOT + value: INFO + - name: APP_REDIS_NODES + value: redis.hyeonworks-prod.svc.cluster.local:6379 + - name: APP_TRACING_ENABLED + value: 'true' + image: git.learn.hyeonworks.com/donghyeon.kang/tech-log-backend:46b1cc7 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /actuator/health/liveness + port: management + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 3 + name: backend + ports: + - containerPort: 8080 + name: http + protocol: TCP + - containerPort: 9001 + name: management + protocol: TCP + readinessProbe: + failureThreshold: 6 + httpGet: + path: /actuator/health/readiness + port: management + initialDelaySeconds: 15 + periodSeconds: 5 + timeoutSeconds: 3 + resources: + limits: + memory: 1536Mi + requests: + cpu: 200m + memory: 512Mi + startupProbe: + failureThreshold: 36 + httpGet: + path: /actuator/health/startup + port: management + periodSeconds: 5 + timeoutSeconds: 3 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /etc/techlog-logging + name: logging-config + readOnly: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + seccompProfile: + type: RuntimeDefault + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + name: techlog-logging + name: logging-config + priorityClassName: platform-critical diff --git a/deploy/production/backend-logging-configmap.yaml b/deploy/production/backend-logging-configmap.yaml new file mode 100644 index 0000000..86719fc --- /dev/null +++ b/deploy/production/backend-logging-configmap.yaml @@ -0,0 +1,81 @@ +apiVersion: v1 +data: + logback-spring.xml: "\n \n\n \n \n \n\n \n \n \n \n \n\n \n \n\ + \ \n\n \n \n \ + \ \n \n\n \n \n\n\ + \ \n \n\n \n \n \ + \ ${LOG_SAMPLING_RATE}\n \n \n\n \n\n \n \n \n false\n\ + \ {\"app\":\"${APP_NAME}\",\"profile\":\"${APP_PROFILE}\"}\n\ + \ trace_id\n span_id\n\ + \ request_id\n correlation_id\n\ + \ user_principal\n ${JSON_TIMEZONE}\n\ + \ ${JSON_TIMESTAMP_PATTERN}\n ${JSON_INCLUDE_CALLER_DATA}\n\ + \ ${JSON_LOGGER_NAME_LENGTH}\n\ + \ \n \n \n \n FILE_ENABLEDtrue\n \n \n \n\ + \ \n ${FILE_PATH}\n \n ${FILE_PATH}.%d{yyyy-MM-dd}.%i.gz\n \ + \ ${FILE_MAX_SIZE}\n ${FILE_MAX_HISTORY}\n\ + \ ${FILE_TOTAL_SIZE_CAP}\n \n\ + \ \n \ + \ false\n {\"app\":\"${APP_NAME}\"\ + ,\"profile\":\"${APP_PROFILE}\"}\n trace_id\n\ + \ span_id\n request_id\n\ + \ correlation_id\n user_principal\n\ + \ ${JSON_TIMEZONE}\n ${JSON_TIMESTAMP_PATTERN}\n\ + \ ${JSON_INCLUDE_CALLER_DATA}\n \ + \ ${JSON_LOGGER_NAME_LENGTH}\n \ + \ \n \n \n \n \n\n \n\n\ + \ \n ASYNC_ENABLEDtrue\n\ + \ \n \n \n \n ${ASYNC_QUEUE_SIZE}\n\ + \ ${ASYNC_DISCARDING_THRESHOLD}\n \ + \ false\n \n \ + \ \n \n FILE_ENABLEDtrue\n \n \ + \ \n \n \n ${ASYNC_QUEUE_SIZE}\n ${ASYNC_DISCARDING_THRESHOLD}\n\ + \ false\n \n \n \n \n \ + \ \n \n\n \n\n \n \n ASYNC_ENABLEDtrue\n \n \n \n\ + \ \n \ + \ FILE_ENABLEDtrue\n \n \n\ + \ \n \n \n \n \ + \ \n \n \n \n \n \n\ + \ \n \n \n \n \n FILE_ENABLEDtrue\n\ + \ \n \n \n \n \n \n \n \n \n\ + \ \n \n \n \n \n \n \ + \ \n" +kind: ConfigMap +metadata: + name: techlog-logging diff --git a/deploy/production/backend-servicemonitor.yaml b/deploy/production/backend-servicemonitor.yaml new file mode 100644 index 0000000..c3e8405 --- /dev/null +++ b/deploy/production/backend-servicemonitor.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + observability.hyeonworks.com/instance: home + name: techlog-backend +spec: + endpoints: + - interval: 30s + path: /actuator/prometheus + port: management + relabelings: + - replacement: techlog + targetLabel: application + scrapeTimeout: 10s + selector: + matchLabels: + app: techlog-backend + component: management diff --git a/deploy/production/backend-services.yaml b/deploy/production/backend-services.yaml new file mode 100644 index 0000000..1b42d84 --- /dev/null +++ b/deploy/production/backend-services.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + name: techlog-backend +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: techlog-backend + type: ClusterIP +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: techlog-backend + component: management + name: techlog-management +spec: + ports: + - name: management + port: 9001 + targetPort: management + selector: + app: techlog-backend + type: ClusterIP diff --git a/deploy/production/frontend-deployment.yaml b/deploy/production/frontend-deployment.yaml new file mode 100644 index 0000000..06aec0b --- /dev/null +++ b/deploy/production/frontend-deployment.yaml @@ -0,0 +1,68 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: techlog-frontend +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: techlog-frontend + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: techlog-frontend + spec: + automountServiceAccountToken: false + containers: + - image: git.learn.hyeonworks.com/donghyeon.kang/tech-log-frontend:7a4e201 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /config.json + port: 80 + scheme: HTTP + initialDelaySeconds: 15 + periodSeconds: 20 + successThreshold: 1 + timeoutSeconds: 1 + name: frontend + ports: + - containerPort: 80 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /config.json + port: 80 + scheme: HTTP + initialDelaySeconds: 3 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + memory: 128Mi + requests: + cpu: 20m + memory: 32Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + securityContext: + allowPrivilegeEscalation: false + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + seccompProfile: + type: RuntimeDefault + terminationGracePeriodSeconds: 30 + priorityClassName: platform-critical diff --git a/deploy/production/frontend-service.yaml b/deploy/production/frontend-service.yaml new file mode 100644 index 0000000..582ec48 --- /dev/null +++ b/deploy/production/frontend-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: techlog-frontend +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: techlog-frontend + type: ClusterIP diff --git a/deploy/production/ingress.yaml b/deploy/production/ingress.yaml new file mode 100644 index 0000000..40d3335 --- /dev/null +++ b/deploy/production/ingress.yaml @@ -0,0 +1,47 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: web + name: hyeonworks-core +spec: + ingressClassName: traefik + rules: + - host: hyeonworks.com + http: + paths: + - backend: + service: + name: techlog-backend + port: + number: 8080 + path: /api + pathType: Prefix + - backend: + service: + name: techlog-backend + port: + number: 8080 + path: /oauth2 + pathType: Prefix + - backend: + service: + name: techlog-backend + port: + number: 8080 + path: /login + pathType: Prefix + - backend: + service: + name: techlog-backend + port: + number: 8080 + path: /logout + pathType: Prefix + - backend: + service: + name: techlog-frontend + port: + number: 80 + path: / + pathType: Prefix diff --git a/deploy/production/kustomization.yaml b/deploy/production/kustomization.yaml new file mode 100644 index 0000000..ca6e265 --- /dev/null +++ b/deploy/production/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +# Application side of hyeonworks.com in the hyeonworks-prod namespace. +# The Namespace, the techlog database role and database, and the +# NetworkPolicies, Probes and rules in platform namespaces belong to +# platform-core services/tenants/techlog. The hyeonworks-secrets Secret is +# created outside Git. +namespace: hyeonworks-prod + +resources: + - backend-logging-configmap.yaml + - backend-deployment.yaml + - backend-services.yaml + - backend-servicemonitor.yaml + - redis-deployment.yaml + - redis-service.yaml + - frontend-deployment.yaml + - frontend-service.yaml + - ingress.yaml + - network-policies.yaml diff --git a/deploy/production/network-policies.yaml b/deploy/production/network-policies.yaml new file mode 100644 index 0000000..a464ec4 --- /dev/null +++ b/deploy/production/network-policies.yaml @@ -0,0 +1,161 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-backend-egress +spec: + egress: + - ports: + - port: 5432 + protocol: TCP + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: platform-data + podSelector: + matchLabels: + cnpg.io/cluster: platform-postgres + - ports: + - port: 9000 + protocol: TCP + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: object-storage + podSelector: + matchLabels: + aistor.min.io/objectStore: minio-aistor + - ports: + - port: 6379 + protocol: TCP + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: hyeonworks-prod + podSelector: + matchLabels: + app: redis + - ports: + - port: 443 + protocol: TCP + to: + - ipBlock: + cidr: 192.168.0.107/32 + podSelector: + matchLabels: + app: techlog-backend + policyTypes: + - Egress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-backend-ingress +spec: + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + podSelector: + matchLabels: + app.kubernetes.io/name: traefik + ports: + - port: 8080 + protocol: TCP + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: observability + podSelector: + matchLabels: + app.kubernetes.io/name: prometheus + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: observability + podSelector: + matchLabels: + app.kubernetes.io/name: prometheus-blackbox-exporter + ports: + - port: 9001 + protocol: TCP + podSelector: + matchLabels: + app: techlog-backend + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-default-deny +spec: + podSelector: {} + policyTypes: + - Ingress + - Egress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-dns-egress +spec: + egress: + - ports: + - port: 53 + protocol: UDP + - port: 53 + protocol: TCP + to: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + podSelector: + matchLabels: + k8s-app: kube-dns + podSelector: {} + policyTypes: + - Egress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-frontend-ingress +spec: + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: kube-system + podSelector: + matchLabels: + app.kubernetes.io/name: traefik + ports: + - port: 80 + protocol: TCP + podSelector: + matchLabels: + app: techlog-frontend + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: techlog-redis-ingress +spec: + ingress: + - from: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: hyeonworks-prod + podSelector: + matchLabels: + app: techlog-backend + ports: + - port: 6379 + protocol: TCP + podSelector: + matchLabels: + app: redis + policyTypes: + - Ingress diff --git a/deploy/production/redis-deployment.yaml b/deploy/production/redis-deployment.yaml new file mode 100644 index 0000000..1fa9e28 --- /dev/null +++ b/deploy/production/redis-deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: redis + strategy: + type: Recreate + template: + metadata: + labels: + app: redis + spec: + automountServiceAccountToken: false + containers: + - args: + - redis-server + - --save + - '' + - --appendonly + - 'no' + image: docker.io/library/redis@sha256:c5d34a98396a4775e223c74e929162c35c5a2182901ba26b50ade939941ce14b + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - redis-cli + - ping + failureThreshold: 3 + initialDelaySeconds: 20 + periodSeconds: 15 + successThreshold: 1 + timeoutSeconds: 1 + name: redis + ports: + - containerPort: 6379 + name: redis + protocol: TCP + readinessProbe: + exec: + command: + - redis-cli + - ping + failureThreshold: 3 + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + memory: 256Mi + requests: + cpu: 50m + memory: 64Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + runAsNonRoot: true + runAsUser: 999 + runAsGroup: 999 + seccompProfile: + type: RuntimeDefault + terminationGracePeriodSeconds: 30 + priorityClassName: platform-critical diff --git a/deploy/production/redis-service.yaml b/deploy/production/redis-service.yaml new file mode 100644 index 0000000..985f590 --- /dev/null +++ b/deploy/production/redis-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis +spec: + ports: + - name: redis + port: 6379 + protocol: TCP + targetPort: 6379 + selector: + app: redis + type: ClusterIP