Kube: add labels to k8s component pods

This PS adds labels to k8s component pods.

Change-Id: I3438bae73080e0cbfec94280bf475a8ccb7ce47d
This commit is contained in:
portdirect 2018-01-18 21:32:49 -05:00
parent 338b0c2e40
commit 12255d0d66
6 changed files with 16 additions and 10 deletions

View File

@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- if .Values.manifests.service }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -22,6 +21,7 @@ metadata:
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
{{ .Values.service.name }}-service: enabled {{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "apiserver" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec: spec:
hostNetwork: true hostNetwork: true
containers: containers:
@ -64,4 +64,3 @@ spec:
- name: etc - name: etc
hostPath: hostPath:
path: {{ .Values.apiserver.host_etc_path }} path: {{ .Values.apiserver.host_etc_path }}
{{- end }}

View File

@ -23,8 +23,8 @@ images:
labels: labels:
kubernetes_apiserver: kubernetes_apiserver:
node_selector_key: kubernetes-apiserver node_selector_key: kubernetes-apiserver
node_selector_value: enabled node_selector_value: enabled
anchor: anchor:
dns_policy: Default dns_policy: Default

View File

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -20,6 +21,7 @@ metadata:
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
{{ .Values.service.name }}-service: enabled {{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "controller-manager" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec: spec:
hostNetwork: true hostNetwork: true
containers: containers:

View File

@ -23,8 +23,8 @@ images:
labels: labels:
controller_manager: controller_manager:
node_selector_key: kubernetes-controller-manager node_selector_key: kubernetes-controller-manager
node_selector_value: enabled node_selector_value: enabled
anchor: anchor:
dns_policy: Default dns_policy: Default

View File

@ -14,14 +14,16 @@
# limitations under the License. # limitations under the License.
*/}} */}}
{{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: kubernetes-scheduler name: {{ .Values.service.name }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
kubernetes-scheduler-service: enabled {{ .Values.service.name }}-service: enabled
{{ tuple $envAll "kubernetes" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
spec: spec:
hostNetwork: true hostNetwork: true
containers: containers:

View File

@ -20,8 +20,8 @@ anchor:
labels: labels:
scheduler: scheduler:
node_selector_key: kubernetes-scheduler node_selector_key: kubernetes-scheduler
node_selector_value: enabled node_selector_value: enabled
pod: pod:
lifecycle: lifecycle:
@ -63,6 +63,9 @@ images:
network: network:
kubernetes_netloc: 10.96.0.1 kubernetes_netloc: 10.96.0.1
service:
name: kubernetes-scheduler
command_prefix: command_prefix:
- /scheduler - /scheduler
- --v=5 - --v=5