Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
Add arg for adding custom labels to kube-proxy pods (#31)
Browse files Browse the repository at this point in the history
* add extra arg to kube-proxy

remove dev.yaml

update v1alpha1

remove print statements

add extra arg to kube-proxy

v1alpha1

almost works maybe

clean up code

update templates

remove dev.yaml

update v1alpha1

* remove print statements
  • Loading branch information
clambert796 authored Jan 4, 2021
1 parent bc6be4a commit 4b12228
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/zz_generated.templates.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/config/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ type KubeProxyConfiguration struct {
// in the future.
//
// https://github.com/kubernetes-sigs/controller-tools/issues/245
Config *kubeproxyconfigv1alpha1.KubeProxyConfiguration `json:"config,omitempty"`
Disabled bool `json:"disabled"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Config *kubeproxyconfigv1alpha1.KubeProxyConfiguration `json:"config,omitempty"`
Disabled bool `json:"disabled"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
ExtraLabels map[string]string `json:"extraLabels,omitempty"`
}
7 changes: 7 additions & 0 deletions pkg/config/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions templates/kube-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ spec:
metadata:
labels:
k8s-app: kube-proxy
{{- if .KubeProxyConfiguration.ExtraLabels }}
{{ toYaml .KubeProxyConfiguration.ExtraLabels | indent 8 }}
{{- end }}
spec:
priorityClassName: system-node-critical
containers:
Expand Down

0 comments on commit 4b12228

Please sign in to comment.