0a5f0339b6b69f0285fabdfe3575aa1aeff838ff
[ta/caas-kubernetes.git] / ansible / roles / kube_proxy / templates / kube-proxy.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: v1
18 kind: Pod
19 metadata:
20   name: kube-proxy
21   namespace: kube-system
22 spec:
23   hostNetwork: true
24   containers:
25     - name: kube-proxy
26       image: {{ container_image_names | select('search', '/hyperkube') | list | last }}
27       securityContext:
28         privileged: true
29       command:
30         - "/kube-proxy"
31         - "--kubeconfig=/etc/kubernetes/kubeconfig/proxyc.yml"
32         - "--hostname-override={{ ansible_host }}"
33         - "--masquerade-all=true"
34       resources:
35         requests:
36           cpu: "10m"
37       volumeMounts:
38         - name: time-mount
39           mountPath: /etc/localtime
40           readOnly: true
41         - name: secret-kubernetes
42           mountPath: /etc/kubernetes/ssl
43           readOnly: true
44         - name: secret-root-ca
45           mountPath: /etc/openssl/ca.pem
46           readOnly: true
47         - name: kubeconfig
48           mountPath: /etc/kubernetes/kubeconfig
49           readOnly: true
50   volumes:
51     - name: time-mount
52       hostPath:
53         path: /etc/localtime
54     - name: secret-kubernetes
55       hostPath:
56         path: /etc/kubernetes/ssl
57     - name: secret-root-ca
58       hostPath:
59         path: /etc/openssl/ca.pem
60     - name: kubeconfig
61       hostPath:
62         path: /etc/kubernetes/kubeconfig