elinuxhenrik | 588bbf3 | 2022-03-04 15:42:59 +0100 | [diff] [blame^] | 1 | apiVersion: v1 |
| 2 | kind: PersistentVolume |
| 3 | metadata: |
| 4 | name: chartmuseum-storage-pv-volume |
| 5 | namespace: default |
| 6 | labels: |
| 7 | type: local |
| 8 | app: chartmuseum |
| 9 | spec: |
| 10 | storageClassName: manual |
| 11 | capacity: |
| 12 | storage: 2Gi |
| 13 | accessModes: |
| 14 | - ReadWriteOnce |
| 15 | hostPath: |
| 16 | path: "/var/chartmuseum/charts" |
| 17 | --- |
| 18 | apiVersion: v1 |
| 19 | kind: PersistentVolumeClaim |
| 20 | metadata: |
| 21 | name: chartmuseum-storage-pv-claim |
| 22 | namespace: default |
| 23 | labels: |
| 24 | app: chartmuseum |
| 25 | spec: |
| 26 | storageClassName: manual |
| 27 | accessModes: |
| 28 | - ReadWriteOnce |
| 29 | resources: |
| 30 | requests: |
| 31 | storage: 2Gi |
| 32 | --- |
| 33 | apiVersion: apps/v1 |
| 34 | kind: Deployment |
| 35 | metadata: |
| 36 | name: chartmuseum-deployment |
| 37 | namespace: default |
| 38 | labels: |
| 39 | app: chartmuseum |
| 40 | spec: |
| 41 | selector: |
| 42 | matchLabels: |
| 43 | app: chartmuseum |
| 44 | template: |
| 45 | metadata: |
| 46 | labels: |
| 47 | app: chartmuseum |
| 48 | version: v1 |
| 49 | spec: |
| 50 | securityContext: |
| 51 | runAsUser: 0 |
| 52 | containers: |
| 53 | - name: chartmuseum |
| 54 | image: chartmuseum/chartmuseum:latest |
| 55 | imagePullPolicy: IfNotPresent |
| 56 | env: |
| 57 | - name: STORAGE |
| 58 | value: local |
| 59 | - name: STORAGE_LOCAL_ROOTDIR |
| 60 | value: /charts |
| 61 | ports: |
| 62 | - name: http |
| 63 | containerPort: 8080 |
| 64 | resources: |
| 65 | limits: |
| 66 | memory: 256Mi |
| 67 | cpu: "250m" |
| 68 | requests: |
| 69 | memory: 128Mi |
| 70 | cpu: "80m" |
| 71 | volumeMounts: |
| 72 | - name: chartmuseum-persistent-storage |
| 73 | mountPath: /charts |
| 74 | volumes: |
| 75 | - name: chartmuseum-persistent-storage |
| 76 | persistentVolumeClaim: |
| 77 | claimName: chartmuseum-storage-pv-claim |
| 78 | replicas: 1 |
| 79 | --- |
| 80 | apiVersion: v1 |
| 81 | kind: Service |
| 82 | metadata: |
| 83 | name: chartmuseum |
| 84 | namespace: default |
| 85 | spec: |
| 86 | selector: |
| 87 | app: chartmuseum |
| 88 | ports: |
| 89 | - name: http |
| 90 | port: 8080 |
| 91 | targetPort: 8080 |
| 92 | nodePort: 31580 |
| 93 | type: LoadBalancer |