apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  labels:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "nginx"
    app.kubernetes.io/version: "1.31.1"
    helm.sh/chart: "nginx-24.0.2"
  name: "nginx"
  namespace: "nginx"
spec:
  replicas: 4
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: "nginx"
      app.kubernetes.io/name: "nginx"
  strategy:
    rollingUpdate:
      {}
    type: "RollingUpdate"
  template:
    metadata:
      annotations: null
      labels:
        app.kubernetes.io/instance: "nginx"
        app.kubernetes.io/managed-by: "Helm"
        app.kubernetes.io/name: "nginx"
        app.kubernetes.io/version: "1.31.1"
        helm.sh/chart: "nginx-24.0.2"
    spec:
      affinity:
        nodeAffinity: null
        podAffinity: null
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            -
              podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/instance: "nginx"
                    app.kubernetes.io/name: "nginx"
                topologyKey: "kubernetes.io/hostname"
              weight: 1
      automountServiceAccountToken: false
      containers:
        -
          env:
            -
              name: "BITNAMI_DEBUG"
              value: "false"
            -
              name: "NGINX_HTTP_PORT_NUMBER"
              value: "8080"
            -
              name: "OPENSSL_FIPS"
              value: "yes"
            -
              name: "NGINX_HTTPS_PORT_NUMBER"
              value: "8443"
          envFrom:
            -
              secretRef:
                name: "ai-provider-credentials"
          image: "registry-1.docker.io/bitnami/nginx@sha256:805bcc863fc3f602589fc75cae91eeedebad234d5ce5a476c96b03a747821e7f"
          imagePullPolicy: "IfNotPresent"
          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            tcpSocket:
              port: "http"
            timeoutSeconds: 5
          name: "nginx"
          ports:
            -
              containerPort: 8080
              name: "http"
            -
              containerPort: 8443
              name: "https"
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: "/"
              port: "http"
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 3
          resources:
            limits:
              cpu: "150m"
              ephemeral-storage: "2Gi"
              memory: "192Mi"
            requests:
              cpu: "100m"
              ephemeral-storage: "50Mi"
              memory: "128Mi"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - "ALL"
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions:
              {}
            seccompProfile:
              type: "RuntimeDefault"
          volumeMounts:
            -
              mountPath: "/tmp"
              name: "empty-dir"
              subPath: "tmp-dir"
            -
              mountPath: "/opt/bitnami/nginx/conf"
              name: "empty-dir"
              subPath: "app-conf-dir"
            -
              mountPath: "/opt/bitnami/nginx/logs"
              name: "empty-dir"
              subPath: "app-logs-dir"
            -
              mountPath: "/opt/bitnami/nginx/tmp"
              name: "empty-dir"
              subPath: "app-tmp-dir"
            -
              mountPath: "/certs"
              name: "empty-dir"
              subPath: "app-tls-dir"
      hostIPC: false
      hostNetwork: false
      initContainers:
        -
          args:
            - "-ec"
            - "#!/bin/bash\n. /opt/bitnami/scripts/libfs.sh\n# We copy the logs folder because it has symlinks to stdout and stderr\nif ! is_dir_empty /opt/bitnami/nginx/logs; then\n  cp -r /opt/bitnami/nginx/logs /emptydir/app-logs-dir\nfi\n"
          command:
            - "/bin/bash"
          env:
            -
              name: "OPENSSL_FIPS"
              value: "yes"
          image: "registry-1.docker.io/bitnami/nginx@sha256:805bcc863fc3f602589fc75cae91eeedebad234d5ce5a476c96b03a747821e7f"
          imagePullPolicy: "IfNotPresent"
          name: "preserve-logs-symlinks"
          resources:
            limits:
              cpu: "150m"
              ephemeral-storage: "2Gi"
              memory: "192Mi"
            requests:
              cpu: "100m"
              ephemeral-storage: "50Mi"
              memory: "128Mi"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - "ALL"
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
            seLinuxOptions:
              {}
            seccompProfile:
              type: "RuntimeDefault"
          volumeMounts:
            -
              mountPath: "/emptydir"
              name: "empty-dir"
      securityContext:
        fsGroup: 1001
        fsGroupChangePolicy: "Always"
        supplementalGroups:
          []
        sysctls:
          []
      serviceAccountName: "nginx"
      shareProcessNamespace: false
      volumes:
        -
          emptyDir:
            {}
          name: "empty-dir"
---
apiVersion: "networking.k8s.io/v1"
kind: "NetworkPolicy"
metadata:
  labels:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "nginx"
    app.kubernetes.io/version: "1.31.1"
    helm.sh/chart: "nginx-24.0.2"
  name: "nginx"
  namespace: "nginx"
spec:
  egress:
    -
      {}
  ingress:
    -
      ports:
        -
          port: 8080
        -
          port: 8443
  podSelector:
    matchLabels:
      app.kubernetes.io/instance: "nginx"
      app.kubernetes.io/name: "nginx"
  policyTypes:
    - "Ingress"
    - "Egress"
---
apiVersion: "policy/v1"
kind: "PodDisruptionBudget"
metadata:
  labels:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "nginx"
    app.kubernetes.io/version: "1.31.1"
    helm.sh/chart: "nginx-24.0.2"
  name: "nginx"
  namespace: "nginx"
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: "nginx"
      app.kubernetes.io/name: "nginx"
---
apiVersion: "v1"
kind: "Service"
metadata:
  annotations: null
  labels:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "nginx"
    app.kubernetes.io/version: "1.31.1"
    helm.sh/chart: "nginx-24.0.2"
  name: "nginx"
  namespace: "nginx"
spec:
  ports:
    -
      name: "http"
      port: 80
      targetPort: "http"
    -
      name: "https"
      port: 443
      targetPort: "https"
  selector:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/name: "nginx"
  type: "ClusterIP"
---
apiVersion: "v1"
automountServiceAccountToken: false
kind: "ServiceAccount"
metadata:
  labels:
    app.kubernetes.io/instance: "nginx"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "nginx"
    app.kubernetes.io/version: "1.31.1"
    helm.sh/chart: "nginx-24.0.2"
  name: "nginx"
  namespace: "nginx"
