Manifest update
[ta/caas-helm.git] / ansible / roles / chart_repo / templates / chart-repo.yml
1 {#
2 Copyright 2019 Nokia
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 #}
16 ---
17 apiVersion: apps/v1beta2
18 kind: Deployment
19 metadata:
20   name: chart-repo
21   namespace: kube-system
22 spec:
23   replicas: 1
24   selector:
25     matchLabels:
26       {{ caas.kubernetes_component_label }}: chart-repo
27   template:
28     metadata:
29       annotations:
30         danm.k8s.io/interfaces: |
31           [
32             {
33               "network":"flannel"
34             }
35           ]
36       labels:
37         {{ caas.kubernetes_component_label }}: chart-repo
38     spec:
39       priorityClassName: "system-cluster-critical"
40       dnsPolicy: ClusterFirst
41       nodeSelector:
42         nodename: caas_master1
43       securityContext:
44         runAsUser: {{ caas.uid.chartrepo }}
45       containers:
46         - name: chart-repo-handler
47           image: {{ container_image_names | select('search', '/chartrepo') | list | last }}
48           imagePullPolicy: IfNotPresent
49           resources:
50             requests:
51               cpu: "10m"
52               memory: "128Mi"
53           command:
54             - "/usr/bin/mainstart.sh"
55           env:
56             - name: CHARTREPOHANDLER_AUTHURL
57               value: {{ caas.swift }}/auth/v1.0
58             - name: CHARTREPOHANDLER_AUTHUSER
59               value: admin:admin
60             - name: CHARTREPOHANDLER_LISTENONPORT
61               value: "{{ caas.chart_repo_port }}"
62             - name: CHARTREPOHANDLER_LISTENONINTERFACE
63               value: "{{ caas.internal_flannel_interface }}"
64             - name: CHARTREPOHANDLER_AUTHKEY
65               value: "{{ swift_pass.stdout }}"
66             - name: CHARTREPOHANDLER_CONTAINER
67               value: packages
68             - name: CHARTREPOHANDLER_REPOURL
69               value: https://{{ caas.chart_repo_url }}
70             - name: CHARTREPOHANDLER_INDEXPATH
71               value: charts
72             - name: CHARTREPOHANDLER_TLSCERTPATH
73               value: /etc/chart-repo/ssl/chart-repo{{ nodeindex }}.pem
74             - name: CHARTREPOHANDLER_TLSKEYPATH
75               value: /etc/chart-repo/ssl/chart-repo{{ nodeindex }}-key.pem
76             - name: CHARTREPOHANDLER_TLSCAPATH
77               value: /etc/chart-repo/ssl/ca.pem
78           volumeMounts:
79             - name: time-mount
80               mountPath: /etc/localtime
81               readOnly: true
82             - name: chart-repo-cert
83               mountPath: /etc/chart-repo/ssl
84               readOnly: true
85       volumes:
86         - name: time-mount
87           hostPath:
88             path: /etc/localtime
89         - name: chart-repo-cert
90           hostPath:
91             path: /etc/chart-repo/ssl