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 apiVersion: rbac.authorization.k8s.io/v1beta1
metadata: metadata:
name: cluster-proportional-autoscaler name: cluster-proportional-autoscaler
namespace: kube-system namespace: {{ system_namespace }}
rules: rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["nodes"] resources: ["nodes"]

View file

@ -16,11 +16,11 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
metadata: metadata:
name: cluster-proportional-autoscaler name: cluster-proportional-autoscaler
namespace: kube-system namespace: {{ system_namespace }}
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: cluster-proportional-autoscaler name: cluster-proportional-autoscaler
namespace: kube-system namespace: {{ system_namespace }}
roleRef: roleRef:
kind: ClusterRole kind: ClusterRole
name: cluster-proportional-autoscaler name: cluster-proportional-autoscaler

View file

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

View file

@ -16,7 +16,7 @@ apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: kubedns-autoscaler name: kubedns-autoscaler
namespace: kube-system namespace: {{ system_namespace }}
labels: labels:
k8s-app: kubedns-autoscaler k8s-app: kubedns-autoscaler
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"
@ -39,7 +39,7 @@ spec:
memory: "10Mi" memory: "10Mi"
command: command:
- /cluster-proportional-autoscaler - /cluster-proportional-autoscaler
- --namespace=kube-system - --namespace={{ system_namespace }}
- --configmap=kubedns-autoscaler - --configmap=kubedns-autoscaler
# Should keep target in sync with cluster/addons/dns/kubedns-controller.yaml.base # Should keep target in sync with cluster/addons/dns/kubedns-controller.yaml.base
- --target=Deployment/kubedns - --target=Deployment/kubedns

View file

@ -11,12 +11,12 @@
register: helm_container register: helm_container
- name: Helm | Configure tiller service account for RBAC - 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 ignore_errors: yes
when: rbac_enabled when: rbac_enabled
- name: Helm | Configure tiller rolebindings for RBAC - 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 ignore_errors: yes
when: rbac_enabled when: rbac_enabled
@ -26,9 +26,9 @@
- name: Helm | Patch tiller deployment for RBAC - name: Helm | Patch tiller deployment for RBAC
shell: > 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)' | \ 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 when: rbac_enabled
- name: Helm | Set up bash completion - name: Helm | Set up bash completion

View file

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