Replace static references to system namespace
This commit is contained in:
parent
992a974b1e
commit
9924a33d6f
6 changed files with 11 additions and 11 deletions
|
@ -16,7 +16,7 @@ kind: ClusterRole
|
|||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: cluster-proportional-autoscaler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
|
|
|
@ -16,11 +16,11 @@ kind: ClusterRoleBinding
|
|||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: cluster-proportional-autoscaler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: cluster-proportional-autoscaler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cluster-proportional-autoscaler
|
||||
|
|
|
@ -16,4 +16,4 @@ kind: ServiceAccount
|
|||
apiVersion: v1
|
||||
metadata:
|
||||
name: cluster-proportional-autoscaler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
|
|
|
@ -16,7 +16,7 @@ apiVersion: extensions/v1beta1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: kubedns-autoscaler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
labels:
|
||||
k8s-app: kubedns-autoscaler
|
||||
kubernetes.io/cluster-service: "true"
|
||||
|
@ -39,7 +39,7 @@ spec:
|
|||
memory: "10Mi"
|
||||
command:
|
||||
- /cluster-proportional-autoscaler
|
||||
- --namespace=kube-system
|
||||
- --namespace={{ system_namespace }}
|
||||
- --configmap=kubedns-autoscaler
|
||||
# Should keep target in sync with cluster/addons/dns/kubedns-controller.yaml.base
|
||||
- --target=Deployment/kubedns
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
register: helm_container
|
||||
|
||||
- name: Helm | Configure tiller service account for RBAC
|
||||
command: kubectl create serviceaccount tiller --namespace=kube-system
|
||||
command: kubectl create serviceaccount tiller --namespace={{ system_namespace }}
|
||||
ignore_errors: yes
|
||||
when: rbac_enabled
|
||||
|
||||
- name: Helm | Configure tiller rolebindings for RBAC
|
||||
command: kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
|
||||
command: kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount={{ system_namespace }}:tiller
|
||||
ignore_errors: yes
|
||||
when: rbac_enabled
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
|||
|
||||
- name: Helm | Patch tiller deployment for RBAC
|
||||
shell: >
|
||||
kubectl --namespace=kube-system get deployment tiller-deploy -o json | \
|
||||
kubectl --namespace={{ system_namespace }} get deployment tiller-deploy -o json | \
|
||||
python -c 'import sys,json;a=json.load(sys.stdin);a["spec"]["template"]["spec"]["serviceAccount"]="tiller";json.dump(a,sys.stdout)' | \
|
||||
kubectl apply -f -
|
||||
kubectl apply -n {{ system_namespace }} -f -
|
||||
when: rbac_enabled
|
||||
|
||||
- name: Helm | Set up bash completion
|
||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: v1
|
|||
kind: Pod
|
||||
metadata:
|
||||
name: kube-scheduler
|
||||
namespace: kube-system
|
||||
namespace: {{ system_namespace }}
|
||||
labels:
|
||||
k8s-app: kube-scheduler
|
||||
spec:
|
||||
|
|
Loading…
Reference in a new issue