apiVersion: v1 kind: Service metadata: name: config-svc namespace: egommerce annotations: haproxy.org/check: "true" labels: app: config-svc spec: type: NodePort selector: app: config-svc ports: - name: config-svc port: 443 nodePort: 31811 # - name: config-svc-metrics # port: 9090 # nodePort: 31811 --- apiVersion: apps/v1 kind: Deployment metadata: name: config-svc namespace: egommerce spec: replicas: 1 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 # Number of extra pods that can be created during update maxUnavailable: 1 # Max number of pods that can be unavailable during update selector: matchLabels: app: config-svc template: metadata: labels: app: config-svc spec: # initContainers: # - name: config-svc-init # image: busybox:1.28 # command: [ # 'sh', # '-c', # '/bin/migrate' # ] containers: - name: config-svc image: git.ego.freeddns.org/egommerce/config-svc:dev imagePullPolicy: Always env: - name: APP_NAME value: config-svc - name: APP_DOMAIN value: config-svc.egommerce.io - name: APP_PATH_PREFIX value: /config - name: API_DATABASE_URL value: postgres://egommerce:12345678@db-postgres:5432/egommerce?sslmode=disable readinessProbe: httpGet: scheme: HTTPS port: config-svc path: /health initialDelaySeconds: 5 periodSeconds: 5 failureThreshold: 1 livenessProbe: httpGet: scheme: HTTPS port: config-svc path: /health initialDelaySeconds: 5 periodSeconds: 5 failureThreshold: 1 volumeMounts: - name: config-cert mountPath: /certs/config-svc.crt readOnly: true - name: config-key mountPath: /certs/config-svc.key readOnly: true - name: config-migrations mountPath: /migrations readOnly: true resources: limits: cpu: 100m memory: 512M requests: cpu: 50m memory: 256M ports: - name: config-svc containerPort: 443 # - name: config-svc-metrics # image: prom/prometheus-exporter:latest # ports: # - containerPort: 9090 # args: # - --web.listen-address=:9090 # - --web.telemetry-path=/metrics # - name: config-scheduler # Scheduler Container # image: git.ego.freeddns.org/egommerce/config-svc:dev # imagePullPolicy: Always # command: [ # "/usr/local/bin/scheduler" # ] # resources: # limits: # cpu: 100m # memory: 512Mi # requests: # cpu: 50m # memory: 256Mi imagePullSecrets: - name: regcred volumes: - name: config-cert hostPath: path: /egommerce/stack/deploy/certs/config-svc/config-svc.crt type: File - name: config-key hostPath: path: /egommerce/stack/deploy/certs/config-svc/config-svc.key type: File - name: config-migrations hostPath: path: /egommerce/stack/deploy/db_migrations/config-svc type: Directory