# Source: chartmuseum/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins-x-chartmuseum
  labels:
    app: chartmuseum
    chart: chartmuseum-2.14.2
    heritage: "Helm"
    release: "chartmuseum"
    gitops.jenkins-x.io/pipeline: 'namespaces'
  namespace: jx
  annotations:
    wave.pusher.com/update-on-config-change: 'true'
spec:
  selector:
    matchLabels:
      app: chartmuseum
      release: "chartmuseum"
  replicas: 1
  strategy:
    type: Recreate
  revisionHistoryLimit: 10
  template:
    metadata:
      name: jenkins-x-chartmuseum
      annotations: {}
      labels:
        app: chartmuseum
        release: "chartmuseum"
    spec:
      securityContext:
        fsGroup: 1000
      containers:
        - name: chartmuseum
          image: chartmuseum/chartmuseum:v0.12.0
          imagePullPolicy: IfNotPresent
          securityContext: {}
          env:
            - name: "AUTH_ANONYMOUS_GET"
              value: "true"
            - name: "CHART_POST_FORM_FIELD_NAME"
              value: "chart"
            - name: "DISABLE_METRICS"
              value: "true"
            - name: "LOG_JSON"
              value: "true"
            - name: "PROV_POST_FORM_FIELD_NAME"
              value: "prov"
            - name: "STORAGE"
              value: "local"
            - name: "BASIC_AUTH_PASS"
              valueFrom:
                secretKeyRef:
                  name: jenkins-x-chartmuseum
                  key: "BASIC_AUTH_PASS"
            - name: "BASIC_AUTH_USER"
              valueFrom:
                secretKeyRef:
                  name: jenkins-x-chartmuseum
                  key: "BASIC_AUTH_USER"
          args:
            - --port=8080
            - --storage-local-rootdir=/storage
          ports:
            - name: http
              containerPort: 8080
          livenessProbe:
            httpGet:
              path: /health
              port: http
            failureThreshold: 3
            initialDelaySeconds: 5
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /health
              port: http
            failureThreshold: 3
            initialDelaySeconds: 5
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          volumeMounts:
            - mountPath: /storage
              name: storage-volume
          resources:
            limits:
              cpu: 200m
              memory: 256Mi
            requests:
              cpu: 160m
              memory: 128Mi
      volumes:
        - name: storage-volume
          persistentVolumeClaim:
            claimName: jenkins-x-chartmuseum
