2020-02-18 12:47:28 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: cloud-controller-manager
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
name: openstack-cloud-controller-manager
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: openstack-cloud-controller-manager
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: openstack-cloud-controller-manager
|
|
|
|
updateStrategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: openstack-cloud-controller-manager
|
|
|
|
spec:
|
|
|
|
nodeSelector:
|
2021-01-21 16:13:03 +00:00
|
|
|
{% if kube_version is version('v1.20.0', '<') %}
|
2020-02-18 12:47:28 +00:00
|
|
|
node-role.kubernetes.io/master: ""
|
2021-01-21 16:13:03 +00:00
|
|
|
{% else %}
|
|
|
|
node-role.kubernetes.io/control-plane: ""
|
|
|
|
{% endif %}
|
2020-02-18 12:47:28 +00:00
|
|
|
securityContext:
|
2021-03-23 18:03:37 +00:00
|
|
|
runAsUser: 999
|
2020-02-18 12:47:28 +00:00
|
|
|
tolerations:
|
|
|
|
- key: node.cloudprovider.kubernetes.io/uninitialized
|
|
|
|
value: "true"
|
|
|
|
effect: NoSchedule
|
|
|
|
- key: node-role.kubernetes.io/master
|
|
|
|
effect: NoSchedule
|
2021-01-21 16:13:03 +00:00
|
|
|
- key: node-role.kubernetes.io/control-plane
|
|
|
|
effect: NoSchedule
|
2020-02-18 12:47:28 +00:00
|
|
|
serviceAccountName: cloud-controller-manager
|
|
|
|
containers:
|
|
|
|
- name: openstack-cloud-controller-manager
|
|
|
|
image: {{ docker_image_repo }}/k8scloudprovider/openstack-cloud-controller-manager:{{ external_openstack_cloud_controller_image_tag }}
|
|
|
|
args:
|
|
|
|
- /bin/openstack-cloud-controller-manager
|
|
|
|
- --v=1
|
|
|
|
- --cloud-config=$(CLOUD_CONFIG)
|
|
|
|
- --cloud-provider=openstack
|
2020-12-17 16:23:09 +00:00
|
|
|
- --cluster-name={{ cluster_name }}
|
2020-02-18 12:47:28 +00:00
|
|
|
- --use-service-account-credentials=true
|
|
|
|
- --address=127.0.0.1
|
2020-10-02 17:14:48 +00:00
|
|
|
{% for key, value in external_openstack_cloud_controller_extra_args.items() %}
|
|
|
|
- "{{ '--' + key + '=' + value }}"
|
|
|
|
{% endfor %}
|
2020-02-18 12:47:28 +00:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/kubernetes/pki
|
|
|
|
name: k8s-certs
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /etc/ssl/certs
|
|
|
|
name: ca-certs
|
|
|
|
readOnly: true
|
2021-05-26 07:35:21 +00:00
|
|
|
- mountPath: /etc/config/cloud.conf
|
2020-02-18 12:47:28 +00:00
|
|
|
name: cloud-config-volume
|
|
|
|
readOnly: true
|
2021-05-26 07:35:21 +00:00
|
|
|
subPath: cloud.conf
|
2020-02-18 12:47:28 +00:00
|
|
|
- mountPath: {{ kube_config_dir }}/external-openstack-cacert.pem
|
2021-05-26 07:35:21 +00:00
|
|
|
name: cloud-config-volume
|
2020-02-18 12:47:28 +00:00
|
|
|
readOnly: true
|
2021-05-26 07:35:21 +00:00
|
|
|
subPath: ca.cert
|
2020-09-11 07:34:14 +00:00
|
|
|
{% if kubelet_flexvolumes_plugins_dir is defined %}
|
2020-02-18 12:47:28 +00:00
|
|
|
- mountPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
|
|
|
|
name: flexvolume-dir
|
2020-09-11 07:34:14 +00:00
|
|
|
{% endif %}
|
2020-02-18 12:47:28 +00:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 200m
|
|
|
|
env:
|
|
|
|
- name: CLOUD_CONFIG
|
|
|
|
value: /etc/config/cloud.conf
|
|
|
|
hostNetwork: true
|
|
|
|
volumes:
|
2020-09-11 07:34:14 +00:00
|
|
|
{% if kubelet_flexvolumes_plugins_dir is defined %}
|
2020-02-18 12:47:28 +00:00
|
|
|
- hostPath:
|
2020-08-04 12:28:35 +00:00
|
|
|
path: "{{ kubelet_flexvolumes_plugins_dir }}"
|
2020-02-18 12:47:28 +00:00
|
|
|
type: DirectoryOrCreate
|
|
|
|
name: flexvolume-dir
|
2020-09-11 07:34:14 +00:00
|
|
|
{% endif %}
|
2020-02-18 12:47:28 +00:00
|
|
|
- hostPath:
|
|
|
|
path: /etc/kubernetes/pki
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
name: k8s-certs
|
|
|
|
- hostPath:
|
|
|
|
path: /etc/ssl/certs
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
name: ca-certs
|
|
|
|
- name: cloud-config-volume
|
|
|
|
secret:
|
|
|
|
secretName: external-openstack-cloud-config
|