mirror of https://github.com/kubernetes/kops.git
Add Cilium agent pod annotations support to improve personalization
Annotations is pretty useful when you need third-party tool to add additional behavior for a k8s resource. Lots of auto-discovery tools are based on this annotations.
This commit is contained in:
parent
2584e4133d
commit
103a98d060
|
@ -4438,6 +4438,12 @@ spec:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
|
agentPodAnnotations:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
description: 'AgentPodAnnotations makes possible to add additional
|
||||||
|
annotations to the cilium agent. Default: none'
|
||||||
|
type: object
|
||||||
agentPrometheusPort:
|
agentPrometheusPort:
|
||||||
description: AgentPrometheusPort is the port to listen to
|
description: AgentPrometheusPort is the port to listen to
|
||||||
for Prometheus metrics. Defaults to 9090.
|
for Prometheus metrics. Defaults to 9090.
|
||||||
|
|
|
@ -434,6 +434,9 @@ type CiliumNetworkingSpec struct {
|
||||||
// Nat6Range is not implemented and may be removed in the future.
|
// Nat6Range is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Nat46Range string `json:"nat46Range,omitempty"`
|
Nat46Range string `json:"nat46Range,omitempty"`
|
||||||
|
// AgentPodAnnotations makes possible to add additional annotations to cilium agent.
|
||||||
|
// Default: none
|
||||||
|
AgentPodAnnotations map[string]string `json:"agentPodAnnotations,omitempty"`
|
||||||
// Pprof is not implemented and may be removed in the future.
|
// Pprof is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Pprof bool `json:"pprof,omitempty"`
|
Pprof bool `json:"pprof,omitempty"`
|
||||||
|
|
|
@ -434,6 +434,9 @@ type CiliumNetworkingSpec struct {
|
||||||
// Nat6Range is not implemented and may be removed in the future.
|
// Nat6Range is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Nat46Range string `json:"nat46Range,omitempty"`
|
Nat46Range string `json:"nat46Range,omitempty"`
|
||||||
|
// AgentPodAnnotations makes possible to add additional annotations to the cilium agent.
|
||||||
|
// Default: none
|
||||||
|
AgentPodAnnotations map[string]string `json:"agentPodAnnotations,omitempty"`
|
||||||
// Pprof is not implemented and may be removed in the future.
|
// Pprof is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Pprof bool `json:"pprof,omitempty"`
|
Pprof bool `json:"pprof,omitempty"`
|
||||||
|
|
|
@ -1849,6 +1849,7 @@ func autoConvert_v1alpha2_CiliumNetworkingSpec_To_kops_CiliumNetworkingSpec(in *
|
||||||
out.LogstashProbeTimer = in.LogstashProbeTimer
|
out.LogstashProbeTimer = in.LogstashProbeTimer
|
||||||
out.DisableMasquerade = in.DisableMasquerade
|
out.DisableMasquerade = in.DisableMasquerade
|
||||||
out.Nat46Range = in.Nat46Range
|
out.Nat46Range = in.Nat46Range
|
||||||
|
out.AgentPodAnnotations = in.AgentPodAnnotations
|
||||||
out.Pprof = in.Pprof
|
out.Pprof = in.Pprof
|
||||||
out.PrefilterDevice = in.PrefilterDevice
|
out.PrefilterDevice = in.PrefilterDevice
|
||||||
out.PrometheusServeAddr = in.PrometheusServeAddr
|
out.PrometheusServeAddr = in.PrometheusServeAddr
|
||||||
|
@ -1958,6 +1959,7 @@ func autoConvert_kops_CiliumNetworkingSpec_To_v1alpha2_CiliumNetworkingSpec(in *
|
||||||
out.LogstashProbeTimer = in.LogstashProbeTimer
|
out.LogstashProbeTimer = in.LogstashProbeTimer
|
||||||
out.DisableMasquerade = in.DisableMasquerade
|
out.DisableMasquerade = in.DisableMasquerade
|
||||||
out.Nat46Range = in.Nat46Range
|
out.Nat46Range = in.Nat46Range
|
||||||
|
out.AgentPodAnnotations = in.AgentPodAnnotations
|
||||||
out.Pprof = in.Pprof
|
out.Pprof = in.Pprof
|
||||||
out.PrefilterDevice = in.PrefilterDevice
|
out.PrefilterDevice = in.PrefilterDevice
|
||||||
out.PrometheusServeAddr = in.PrometheusServeAddr
|
out.PrometheusServeAddr = in.PrometheusServeAddr
|
||||||
|
|
|
@ -564,6 +564,13 @@ func (in *CiliumNetworkingSpec) DeepCopyInto(out *CiliumNetworkingSpec) {
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
|
if in.AgentPodAnnotations != nil {
|
||||||
|
in, out := &in.AgentPodAnnotations, &out.AgentPodAnnotations
|
||||||
|
*out = make(map[string]string, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
if in.EnableRemoteNodeIdentity != nil {
|
if in.EnableRemoteNodeIdentity != nil {
|
||||||
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
|
|
|
@ -434,6 +434,9 @@ type CiliumNetworkingSpec struct {
|
||||||
// Nat6Range is not implemented and may be removed in the future.
|
// Nat6Range is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Nat46Range string `json:"nat46Range,omitempty"`
|
Nat46Range string `json:"nat46Range,omitempty"`
|
||||||
|
// AgentPodAnnotations makes possible to add additional annotations to the cilium agent.
|
||||||
|
// Default: none
|
||||||
|
AgentPodAnnotations map[string]string `json:"agentPodAnnotations,omitempty"`
|
||||||
// Pprof is not implemented and may be removed in the future.
|
// Pprof is not implemented and may be removed in the future.
|
||||||
// Setting this has no effect.
|
// Setting this has no effect.
|
||||||
Pprof bool `json:"pprof,omitempty"`
|
Pprof bool `json:"pprof,omitempty"`
|
||||||
|
|
|
@ -1849,6 +1849,7 @@ func autoConvert_v1alpha3_CiliumNetworkingSpec_To_kops_CiliumNetworkingSpec(in *
|
||||||
out.LogstashProbeTimer = in.LogstashProbeTimer
|
out.LogstashProbeTimer = in.LogstashProbeTimer
|
||||||
out.DisableMasquerade = in.DisableMasquerade
|
out.DisableMasquerade = in.DisableMasquerade
|
||||||
out.Nat46Range = in.Nat46Range
|
out.Nat46Range = in.Nat46Range
|
||||||
|
out.AgentPodAnnotations = in.AgentPodAnnotations
|
||||||
out.Pprof = in.Pprof
|
out.Pprof = in.Pprof
|
||||||
out.PrefilterDevice = in.PrefilterDevice
|
out.PrefilterDevice = in.PrefilterDevice
|
||||||
out.PrometheusServeAddr = in.PrometheusServeAddr
|
out.PrometheusServeAddr = in.PrometheusServeAddr
|
||||||
|
@ -1958,6 +1959,7 @@ func autoConvert_kops_CiliumNetworkingSpec_To_v1alpha3_CiliumNetworkingSpec(in *
|
||||||
out.LogstashProbeTimer = in.LogstashProbeTimer
|
out.LogstashProbeTimer = in.LogstashProbeTimer
|
||||||
out.DisableMasquerade = in.DisableMasquerade
|
out.DisableMasquerade = in.DisableMasquerade
|
||||||
out.Nat46Range = in.Nat46Range
|
out.Nat46Range = in.Nat46Range
|
||||||
|
out.AgentPodAnnotations = in.AgentPodAnnotations
|
||||||
out.Pprof = in.Pprof
|
out.Pprof = in.Pprof
|
||||||
out.PrefilterDevice = in.PrefilterDevice
|
out.PrefilterDevice = in.PrefilterDevice
|
||||||
out.PrometheusServeAddr = in.PrometheusServeAddr
|
out.PrometheusServeAddr = in.PrometheusServeAddr
|
||||||
|
|
|
@ -564,6 +564,13 @@ func (in *CiliumNetworkingSpec) DeepCopyInto(out *CiliumNetworkingSpec) {
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
|
if in.AgentPodAnnotations != nil {
|
||||||
|
in, out := &in.AgentPodAnnotations, &out.AgentPodAnnotations
|
||||||
|
*out = make(map[string]string, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
if in.EnableRemoteNodeIdentity != nil {
|
if in.EnableRemoteNodeIdentity != nil {
|
||||||
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
|
|
|
@ -641,6 +641,13 @@ func (in *CiliumNetworkingSpec) DeepCopyInto(out *CiliumNetworkingSpec) {
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
|
if in.AgentPodAnnotations != nil {
|
||||||
|
in, out := &in.AgentPodAnnotations, &out.AgentPodAnnotations
|
||||||
|
*out = make(map[string]string, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
if in.EnableRemoteNodeIdentity != nil {
|
if in.EnableRemoteNodeIdentity != nil {
|
||||||
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
in, out := &in.EnableRemoteNodeIdentity, &out.EnableRemoteNodeIdentity
|
||||||
*out = new(bool)
|
*out = new(bool)
|
||||||
|
|
|
@ -555,6 +555,9 @@ spec:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
prometheus.io/port: {{ printf "%q" .AgentPrometheusPort }}
|
prometheus.io/port: {{ printf "%q" .AgentPrometheusPort }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{- with .AgentPodAnnotations }}
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
k8s-app: cilium
|
k8s-app: cilium
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
|
|
|
@ -587,6 +587,9 @@ spec:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
prometheus.io/port: {{ printf "%q" .AgentPrometheusPort }}
|
prometheus.io/port: {{ printf "%q" .AgentPrometheusPort }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{- with .AgentPodAnnotations }}
|
||||||
|
{{- . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
k8s-app: cilium
|
k8s-app: cilium
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
|
|
Loading…
Reference in New Issue