Replace static references to system namespace

This commit is contained in:
Raj Perera 2017-06-16 11:21:59 -04:00 committed by jwfang
parent c8a2fe321b
commit 5a86194038
6 changed files with 11 additions and 11 deletions

View file

@ -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"]

View file

@ -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

View file

@ -16,4 +16,4 @@ kind: ServiceAccount
apiVersion: v1
metadata:
name: cluster-proportional-autoscaler
namespace: kube-system
namespace: {{ system_namespace }}

View file

@ -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

View file

@ -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

View file

@ -2,7 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: kube-scheduler
namespace: kube-system
namespace: {{ system_namespace }}
labels:
k8s-app: kube-scheduler
spec: