BjornMagnussonXA | 31b0988 | 2021-06-02 01:56:26 +0200 | [diff] [blame] | 1 | # ============LICENSE_START=============================================== |
| 2 | # Copyright (C) 2020 Nordix Foundation. All rights reserved. |
| 3 | # ======================================================================== |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # ============LICENSE_END================================================= |
| 16 | # |
| 17 | |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
| 21 | name: chartrepo |
| 22 | namespace: nonrtric |
| 23 | labels: |
| 24 | run: chartrepo |
| 25 | spec: |
| 26 | type: NodePort |
| 27 | ports: |
| 28 | - port: 8080 |
| 29 | targetPort: 8080 |
| 30 | protocol: TCP |
| 31 | name: http |
| 32 | selector: |
| 33 | run: chartrepo |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | apiVersion: v1 |
| 38 | kind: Pod |
| 39 | metadata: |
| 40 | name: chartrepo |
| 41 | namespace: nonrtric |
| 42 | labels: |
| 43 | run: chartrepo |
| 44 | spec: |
| 45 | securityContext: |
| 46 | runAsUser: 0 |
| 47 | containers: |
| 48 | - name: chartrepo |
| 49 | image: ghcr.io/helm/chartmuseum:v0.13.1 |
| 50 | imagePullPolicy: Always |
| 51 | ports: |
| 52 | - name: http |
| 53 | containerPort: 8080 |
| 54 | env: |
| 55 | - name: DEBUG |
| 56 | value: "1" |
| 57 | - name: STORAGE |
| 58 | value: "local" |
| 59 | - name: STORAGE_LOCAL_ROOTDIR |
| 60 | value: "/var/chartrepo/charts" |
| 61 | - name: DISABLE_API |
| 62 | value: "false" |
| 63 | volumeMounts: |
| 64 | - mountPath: /var/chartrepo/charts |
| 65 | name: chartrepo-pv |
| 66 | volumes: |
| 67 | - name: chartrepo-pv |
| 68 | persistentVolumeClaim: |
| 69 | claimName: chartrepo-pvc |
| 70 | |
| 71 | |
| 72 | --- |
| 73 | |
| 74 | apiVersion: v1 |
| 75 | kind: PersistentVolume |
| 76 | metadata: |
| 77 | name: chartrepo-pv |
| 78 | annotations: |
| 79 | pv.beta.kubernetes.io/gid: "999" |
| 80 | labels: |
| 81 | run: chartrepo |
| 82 | spec: |
| 83 | storageClassName: chartrepo-standard |
| 84 | capacity: |
| 85 | storage: 10Mi |
| 86 | accessModes: |
| 87 | - ReadWriteOnce |
| 88 | persistentVolumeReclaimPolicy: Delete |
| 89 | hostPath: |
| 90 | path: "/tmp/chartrepo" |
| 91 | |
| 92 | --- |
| 93 | |
| 94 | apiVersion: v1 |
| 95 | kind: PersistentVolumeClaim |
| 96 | metadata: |
| 97 | name: chartrepo-pvc |
| 98 | namespace: nonrtric |
| 99 | labels: |
| 100 | run: chartrepo |
| 101 | spec: |
| 102 | accessModes: |
| 103 | - ReadWriteOnce |
| 104 | resources: |
| 105 | requests: |
| 106 | storage: 10Mi |
| 107 | storageClassName: chartrepo-standard |
| 108 | volumeMode: Filesystem |