diff --git a/Documentation/api.md b/Documentation/api.md
index ab520b58d1..30dfe7a68f 100644
--- a/Documentation/api.md
+++ b/Documentation/api.md
@@ -12097,7 +12097,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -17972,7 +17972,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -18501,7 +18501,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -18762,7 +18762,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -19038,7 +19038,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -19670,7 +19670,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -20124,7 +20124,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -20258,7 +20258,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -20624,7 +20624,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -20834,7 +20834,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -21440,7 +21440,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
@@ -24980,7 +24980,7 @@ If unset, Prometheus uses its default value.
proxyConnectHeader
-map[string]k8s.io/api/core/v1.SecretKeySelector
+map[string][]k8s.io/api/core/v1.SecretKeySelector
diff --git a/bundle.yaml b/bundle.yaml
index 79855463b7..1274d71836 100644
--- a/bundle.yaml
+++ b/bundle.yaml
@@ -36520,26 +36520,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -37101,26 +37103,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -37500,26 +37504,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -37963,26 +37969,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -38453,26 +38461,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -38937,26 +38947,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -39238,26 +39250,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -39684,26 +39698,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -40126,26 +40142,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -40704,25 +40722,28 @@ spec:
x-kubernetes-map-type: atomic
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
diff --git a/example/prometheus-operator-crd-full/monitoring.coreos.com_scrapeconfigs.yaml b/example/prometheus-operator-crd-full/monitoring.coreos.com_scrapeconfigs.yaml
index 55dac23767..aae49710c3 100644
--- a/example/prometheus-operator-crd-full/monitoring.coreos.com_scrapeconfigs.yaml
+++ b/example/prometheus-operator-crd-full/monitoring.coreos.com_scrapeconfigs.yaml
@@ -264,26 +264,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -845,26 +847,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -1244,26 +1248,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -1707,26 +1713,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2197,26 +2205,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2681,26 +2691,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2982,26 +2994,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -3428,26 +3442,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -3870,26 +3886,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -4448,25 +4466,28 @@ spec:
x-kubernetes-map-type: atomic
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
diff --git a/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml b/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
index 323ef122ef..59c678807b 100644
--- a/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+++ b/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
@@ -265,26 +265,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -846,26 +848,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -1245,26 +1249,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -1708,26 +1714,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2198,26 +2206,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2682,26 +2692,28 @@ spec:
type: integer
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -2983,26 +2995,28 @@ spec:
type: string
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -3429,26 +3443,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -3871,26 +3887,28 @@ spec:
type: object
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
@@ -4449,25 +4467,28 @@ spec:
x-kubernetes-map-type: atomic
proxyConnectHeader:
additionalProperties:
- description: SecretKeySelector selects a key of a Secret.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: |-
- Name of the referent.
- More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- x-kubernetes-map-type: atomic
+ items:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: |-
+ Name of the referent.
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
description: |-
ProxyConnectHeader optionally specifies headers to send to
proxies during CONNECT requests.
diff --git a/jsonnet/prometheus-operator/scrapeconfigs-crd.json b/jsonnet/prometheus-operator/scrapeconfigs-crd.json
index 62915248a0..bc37770ae5 100644
--- a/jsonnet/prometheus-operator/scrapeconfigs-crd.json
+++ b/jsonnet/prometheus-operator/scrapeconfigs-crd.json
@@ -254,26 +254,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -829,26 +832,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -1224,26 +1230,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -1684,26 +1693,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -2168,26 +2180,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -2632,26 +2647,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -2926,26 +2944,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -3354,26 +3375,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -3803,26 +3827,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
@@ -4366,26 +4393,29 @@
},
"proxyConnectHeader": {
"additionalProperties": {
- "description": "SecretKeySelector selects a key of a Secret.",
- "properties": {
- "key": {
- "description": "The key of the secret to select from. Must be a valid secret key.",
- "type": "string"
- },
- "name": {
- "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
- "type": "string"
+ "items": {
+ "description": "SecretKeySelector selects a key of a Secret.",
+ "properties": {
+ "key": {
+ "description": "The key of the secret to select from. Must be a valid secret key.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
+ "type": "string"
+ },
+ "optional": {
+ "description": "Specify whether the Secret or its key must be defined",
+ "type": "boolean"
+ }
},
- "optional": {
- "description": "Specify whether the Secret or its key must be defined",
- "type": "boolean"
- }
+ "required": [
+ "key"
+ ],
+ "type": "object",
+ "x-kubernetes-map-type": "atomic"
},
- "required": [
- "key"
- ],
- "type": "object",
- "x-kubernetes-map-type": "atomic"
+ "type": "array"
},
"description": "ProxyConnectHeader optionally specifies headers to send to\nproxies during CONNECT requests.\n\n\nIt requires Prometheus >= v2.43.0.",
"type": "object",
diff --git a/pkg/apis/monitoring/v1/types.go b/pkg/apis/monitoring/v1/types.go
index 327088f031..a49b87d66d 100644
--- a/pkg/apis/monitoring/v1/types.go
+++ b/pkg/apis/monitoring/v1/types.go
@@ -101,7 +101,7 @@ type ProxyConfig struct {
// It requires Prometheus >= v2.43.0.
// +optional
// +mapType:=atomic
- ProxyConnectHeader map[string]v1.SecretKeySelector `json:"proxyConnectHeader,omitempty"`
+ ProxyConnectHeader map[string][]v1.SecretKeySelector `json:"proxyConnectHeader,omitempty"`
}
// ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object.
diff --git a/pkg/apis/monitoring/v1/zz_generated.deepcopy.go b/pkg/apis/monitoring/v1/zz_generated.deepcopy.go
index e0ab562eb3..ee2b40fe9f 100644
--- a/pkg/apis/monitoring/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/monitoring/v1/zz_generated.deepcopy.go
@@ -2210,9 +2210,20 @@ func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) {
}
if in.ProxyConnectHeader != nil {
in, out := &in.ProxyConnectHeader, &out.ProxyConnectHeader
- *out = make(map[string]corev1.SecretKeySelector, len(*in))
+ *out = make(map[string][]corev1.SecretKeySelector, len(*in))
for key, val := range *in {
- (*out)[key] = *val.DeepCopy()
+ var outVal []corev1.SecretKeySelector
+ if val == nil {
+ (*out)[key] = nil
+ } else {
+ inVal := (*in)[key]
+ in, out := &inVal, &outVal
+ *out = make([]corev1.SecretKeySelector, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ (*out)[key] = outVal
}
}
}
diff --git a/pkg/client/applyconfiguration/monitoring/v1/proxyconfig.go b/pkg/client/applyconfiguration/monitoring/v1/proxyconfig.go
index 9f29481afa..21eef8243f 100644
--- a/pkg/client/applyconfiguration/monitoring/v1/proxyconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1/proxyconfig.go
@@ -23,10 +23,10 @@ import (
// ProxyConfigApplyConfiguration represents an declarative configuration of the ProxyConfig type for use
// with apply.
type ProxyConfigApplyConfiguration struct {
- ProxyURL *string `json:"proxyUrl,omitempty"`
- NoProxy *string `json:"noProxy,omitempty"`
- ProxyFromEnvironment *bool `json:"proxyFromEnvironment,omitempty"`
- ProxyConnectHeader map[string]v1.SecretKeySelector `json:"proxyConnectHeader,omitempty"`
+ ProxyURL *string `json:"proxyUrl,omitempty"`
+ NoProxy *string `json:"noProxy,omitempty"`
+ ProxyFromEnvironment *bool `json:"proxyFromEnvironment,omitempty"`
+ ProxyConnectHeader map[string][]v1.SecretKeySelector `json:"proxyConnectHeader,omitempty"`
}
// ProxyConfigApplyConfiguration constructs an declarative configuration of the ProxyConfig type for use with
@@ -63,9 +63,9 @@ func (b *ProxyConfigApplyConfiguration) WithProxyFromEnvironment(value bool) *Pr
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *ProxyConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]v1.SecretKeySelector) *ProxyConfigApplyConfiguration {
+func (b *ProxyConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]v1.SecretKeySelector) *ProxyConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]v1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]v1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/consulsdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/consulsdconfig.go
index 4707c2715a..dfbd69cb0d 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/consulsdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/consulsdconfig.go
@@ -210,9 +210,9 @@ func (b *ConsulSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool)
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *ConsulSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]v1.SecretKeySelector) *ConsulSDConfigApplyConfiguration {
+func (b *ConsulSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]v1.SecretKeySelector) *ConsulSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]v1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]v1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/digitaloceansdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/digitaloceansdconfig.go
index 4e0263c3e1..71f1b077ca 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/digitaloceansdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/digitaloceansdconfig.go
@@ -85,9 +85,9 @@ func (b *DigitalOceanSDConfigApplyConfiguration) WithProxyFromEnvironment(value
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *DigitalOceanSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *DigitalOceanSDConfigApplyConfiguration {
+func (b *DigitalOceanSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *DigitalOceanSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/dockersdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/dockersdconfig.go
index a150d44832..3ed0829d08 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/dockersdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/dockersdconfig.go
@@ -81,9 +81,9 @@ func (b *DockerSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool)
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *DockerSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *DockerSDConfigApplyConfiguration {
+func (b *DockerSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *DockerSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/eurekasdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/eurekasdconfig.go
index 28f095289a..c42593ecb3 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/eurekasdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/eurekasdconfig.go
@@ -110,9 +110,9 @@ func (b *EurekaSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool)
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *EurekaSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *EurekaSDConfigApplyConfiguration {
+func (b *EurekaSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *EurekaSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/hetznersdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/hetznersdconfig.go
index 3f0dfbdb5e..a15e128554 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/hetznersdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/hetznersdconfig.go
@@ -103,9 +103,9 @@ func (b *HetznerSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool)
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *HetznerSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *HetznerSDConfigApplyConfiguration {
+func (b *HetznerSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *HetznerSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/httpsdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/httpsdconfig.go
index e6c1185995..9ccca7fbe0 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/httpsdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/httpsdconfig.go
@@ -107,9 +107,9 @@ func (b *HTTPSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool) *H
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *HTTPSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *HTTPSDConfigApplyConfiguration {
+func (b *HTTPSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *HTTPSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/kubernetessdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/kubernetessdconfig.go
index 91cd763589..8c02fed942 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/kubernetessdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/kubernetessdconfig.go
@@ -113,9 +113,9 @@ func (b *KubernetesSDConfigApplyConfiguration) WithProxyFromEnvironment(value bo
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *KubernetesSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *KubernetesSDConfigApplyConfiguration {
+func (b *KubernetesSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *KubernetesSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/kumasdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/kumasdconfig.go
index b63e469d3f..f841377343 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/kumasdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/kumasdconfig.go
@@ -104,9 +104,9 @@ func (b *KumaSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool) *K
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *KumaSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *KumaSDConfigApplyConfiguration {
+func (b *KumaSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *KumaSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/nomadsdconfig.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/nomadsdconfig.go
index fd787c36bf..c36211b163 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/nomadsdconfig.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/nomadsdconfig.go
@@ -154,9 +154,9 @@ func (b *NomadSDConfigApplyConfiguration) WithProxyFromEnvironment(value bool) *
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *NomadSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *NomadSDConfigApplyConfiguration {
+func (b *NomadSDConfigApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *NomadSDConfigApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/client/applyconfiguration/monitoring/v1alpha1/scrapeconfigspec.go b/pkg/client/applyconfiguration/monitoring/v1alpha1/scrapeconfigspec.go
index 01cbf15207..8f7fdbc6fc 100644
--- a/pkg/client/applyconfiguration/monitoring/v1alpha1/scrapeconfigspec.go
+++ b/pkg/client/applyconfiguration/monitoring/v1alpha1/scrapeconfigspec.go
@@ -494,9 +494,9 @@ func (b *ScrapeConfigSpecApplyConfiguration) WithProxyFromEnvironment(value bool
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the ProxyConnectHeader field,
// overwriting an existing map entries in ProxyConnectHeader field with the same key.
-func (b *ScrapeConfigSpecApplyConfiguration) WithProxyConnectHeader(entries map[string]corev1.SecretKeySelector) *ScrapeConfigSpecApplyConfiguration {
+func (b *ScrapeConfigSpecApplyConfiguration) WithProxyConnectHeader(entries map[string][]corev1.SecretKeySelector) *ScrapeConfigSpecApplyConfiguration {
if b.ProxyConnectHeader == nil && len(entries) > 0 {
- b.ProxyConnectHeader = make(map[string]corev1.SecretKeySelector, len(entries))
+ b.ProxyConnectHeader = make(map[string][]corev1.SecretKeySelector, len(entries))
}
for k, v := range entries {
b.ProxyConnectHeader[k] = v
diff --git a/pkg/prometheus/promcfg.go b/pkg/prometheus/promcfg.go
index 37ca1fbb8e..16efe97e95 100644
--- a/pkg/prometheus/promcfg.go
+++ b/pkg/prometheus/promcfg.go
@@ -598,13 +598,14 @@ func (cg *ConfigGenerator) addProxyConfigtoYaml(
}
if proxyConfig.ProxyConnectHeader != nil {
- proxyConnectHeader := make(map[string]string, len(proxyConfig.ProxyConnectHeader))
+ proxyConnectHeader := make(map[string][]string, len(proxyConfig.ProxyConnectHeader))
for k, v := range proxyConfig.ProxyConnectHeader {
- value, _ := store.GetKey(ctx, namespace, monitoringv1.SecretOrConfigMap{
- Secret: &v,
- })
- proxyConnectHeader[k] = value
+ proxyConnectHeader[k] = []string{}
+ for _, s := range v {
+ value, _ := store.GetSecretKey(ctx, namespace, s)
+ proxyConnectHeader[k] = append(proxyConnectHeader[k], value)
+ }
}
cfg = cgProxyConfig.AppendMapItem(cfg, "proxy_connect_header", stringMapToMapSlice(proxyConnectHeader))
@@ -3751,8 +3752,10 @@ func validateProxyConfig(ctx context.Context, pc monitoringv1.ProxyConfig, store
}
for k, v := range pc.ProxyConnectHeader {
- if _, err := store.GetSecretKey(ctx, namespace, v); err != nil {
- return fmt.Errorf("header[%s]: %w", k, err)
+ for index, s := range v {
+ if _, err := store.GetSecretKey(ctx, namespace, s); err != nil {
+ return fmt.Errorf("header[%s]: index[%d] %w", k, index, err)
+ }
}
}
diff --git a/pkg/prometheus/promcfg_test.go b/pkg/prometheus/promcfg_test.go
index 71c49323d0..b64a42a2c1 100644
--- a/pkg/prometheus/promcfg_test.go
+++ b/pkg/prometheus/promcfg_test.go
@@ -5363,12 +5363,14 @@ func TestScrapeConfigSpecConfig(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "foo",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -5605,18 +5607,67 @@ func TestScrapeConfigSpecConfig(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "foo",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
},
golden: "ScrapeConfigSpecConfig_ProxySettings.golden",
},
+ {
+ name: "proxy_settings_with_muti_proxy_connect_header_values",
+ scSpec: monitoringv1alpha1.ScrapeConfigSpec{
+ ProxyConfig: monitoringv1.ProxyConfig{
+ ProxyURL: ptr.To("http://no-proxy.com"),
+ NoProxy: ptr.To("0.0.0.0"),
+ ProxyFromEnvironment: ptr.To(false),
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
+ "header": {
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "proxy-header",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "token",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "bar",
+ },
+ Key: "proxy-header",
+ },
+ },
+ "token": {
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "token",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "bar",
+ },
+ Key: "token",
+ },
+ },
+ },
+ },
+ },
+ golden: "ScrapeConfigSpecConfig_ProxySettingsWithMutiProxyConnectHeaderValues.golden",
+ },
{
name: "proxy_settings_incompatible_prometheus_version",
patchProm: func(p *monitoringv1.Prometheus) {
@@ -5627,12 +5678,14 @@ func TestScrapeConfigSpecConfig(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "foo",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -5726,21 +5779,33 @@ func TestScrapeConfigSpecConfig(t *testing.T) {
cg := mustNewConfigGenerator(t, p)
- sec := &v1.Secret{
- ObjectMeta: metav1.ObjectMeta{
- Name: "foo",
- Namespace: "default",
+ store := assets.NewTestStoreBuilder(
+ &v1.Secret{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "foo",
+ Namespace: "default",
+ },
+ Data: map[string][]byte{
+ "proxy-header": []byte("value"),
+ "token": []byte("value"),
+ "username": []byte("scrape-bob"),
+ "password": []byte("scrape-alice"),
+ "username-sd": []byte("http-sd-bob"),
+ "password-sd": []byte("http-sd-alice"),
+ },
},
- Data: map[string][]byte{
- "proxy-header": []byte("value"),
- "token": []byte("value"),
- "username": []byte("scrape-bob"),
- "password": []byte("scrape-alice"),
- "username-sd": []byte("http-sd-bob"),
- "password-sd": []byte("http-sd-alice"),
+ &v1.Secret{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "bar",
+ Namespace: "default",
+ },
+ Data: map[string][]byte{
+ "proxy-header": []byte("bar-value"),
+ "token": []byte("bar-value"),
+ },
},
- }
- store := assets.NewTestStoreBuilder(sec)
+ )
+
store.TokenAssets = map[string]assets.Token{
"scrapeconfig/auth/default/testscrapeconfig1": assets.Token("scrape-secret"),
"scrapeconfig/auth/default/testscrapeconfig1/httpsdconfig/0": assets.Token("http-sd-secret"),
@@ -5787,12 +5852,14 @@ func TestScrapeConfigSpecConfigWithKubernetesSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -6087,12 +6154,14 @@ func TestScrapeConfigSpecConfigWithConsulSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "foo",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -6759,12 +6828,14 @@ func TestScrapeConfigSpecConfigWithDigitalOceanSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -6942,12 +7013,14 @@ func TestScrapeConfigSpecConfigWithDockerSDConfig(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -7189,12 +7262,14 @@ func TestScrapeConfigSpecConfigWithHetznerSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -7479,12 +7554,14 @@ func TestScrapeConfigSpecConfigWithKumaSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -8192,12 +8269,14 @@ func TestScrapeConfigSpecConfigWithEurekaSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
@@ -8374,12 +8453,14 @@ func TestScrapeConfigSpecConfigWithNomadSD(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "proxy-header",
},
- Key: "proxy-header",
},
},
},
diff --git a/pkg/prometheus/resource_selector_test.go b/pkg/prometheus/resource_selector_test.go
index 8b9c53313c..1775ec4384 100644
--- a/pkg/prometheus/resource_selector_test.go
+++ b/pkg/prometheus/resource_selector_test.go
@@ -1392,12 +1392,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
}
@@ -1408,12 +1410,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
scenario: "invalid proxy config with proxyConnectHeaders but no proxyUrl defined or proxyFromEnvironment set to true",
updateSpec: func(sc *monitoringv1alpha1.ScrapeConfigSpec) {
sc.ProxyConfig = monitoringv1.ProxyConfig{
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
}
@@ -1426,12 +1430,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
sc.ProxyConfig = monitoringv1.ProxyConfig{
ProxyURL: ptr.To("http://no-proxy.com"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
}
@@ -1444,12 +1450,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
sc.ProxyConfig = monitoringv1.ProxyConfig{
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
}
@@ -1463,12 +1471,20 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "invalid-key",
},
- Key: "invalid-key",
},
},
}
@@ -1484,6 +1500,60 @@ func TestSelectScrapeConfigs(t *testing.T) {
},
selected: false,
},
+ {
+ scenario: "valid proxy config with muti header values",
+ updateSpec: func(sc *monitoringv1alpha1.ScrapeConfigSpec) {
+ sc.ProxyConfig = monitoringv1.ProxyConfig{
+ ProxyURL: ptr.To("http://no-proxy.com"),
+ NoProxy: ptr.To("0.0.0.0"),
+ ProxyFromEnvironment: ptr.To(false),
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
+ "header": {
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
+ },
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
+ },
+ },
+ },
+ }
+ },
+ selected: true,
+ },
+ {
+ scenario: "invalid proxy config with one invalid secret key",
+ updateSpec: func(sc *monitoringv1alpha1.ScrapeConfigSpec) {
+ sc.ProxyConfig = monitoringv1.ProxyConfig{
+ ProxyURL: ptr.To("http://no-proxy.com"),
+ NoProxy: ptr.To("0.0.0.0"),
+ ProxyFromEnvironment: ptr.To(false),
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
+ "header": {
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "invalid-key",
+ },
+ },
+ },
+ }
+ },
+ selected: false,
+ },
{
scenario: "HTTP SD config with valid secret ref",
updateSpec: func(sc *monitoringv1alpha1.ScrapeConfigSpec) {
@@ -1532,12 +1602,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -1555,12 +1627,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyConfig: monitoringv1.ProxyConfig{
ProxyURL: ptr.To("http://no-proxy.com"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -1578,12 +1652,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "invalid-key",
},
- Key: "invalid-key",
},
},
},
@@ -1696,12 +1772,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -1719,12 +1797,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyConfig: monitoringv1.ProxyConfig{
ProxyURL: ptr.To("http://no-proxy.com"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -1915,12 +1995,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "foo",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "foo",
+ },
+ Key: "invalid-key",
},
- Key: "invalid-key",
},
},
},
@@ -2311,12 +2393,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -2407,12 +2491,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -2638,12 +2724,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -2661,12 +2749,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyConfig: monitoringv1.ProxyConfig{
ProxyURL: ptr.To("http://no-proxy.com"),
ProxyFromEnvironment: ptr.To(true),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
@@ -2738,12 +2828,14 @@ func TestSelectScrapeConfigs(t *testing.T) {
ProxyURL: ptr.To("http://no-proxy.com"),
NoProxy: ptr.To("0.0.0.0"),
ProxyFromEnvironment: ptr.To(false),
- ProxyConnectHeader: map[string]v1.SecretKeySelector{
+ ProxyConnectHeader: map[string][]v1.SecretKeySelector{
"header": {
- LocalObjectReference: v1.LocalObjectReference{
- Name: "secret",
+ {
+ LocalObjectReference: v1.LocalObjectReference{
+ Name: "secret",
+ },
+ Key: "key1",
},
- Key: "key1",
},
},
},
diff --git a/pkg/prometheus/testdata/ConsulScrapeConfig.golden b/pkg/prometheus/testdata/ConsulScrapeConfig.golden
index dffddaaf0b..37f132d3c4 100644
--- a/pkg/prometheus/testdata/ConsulScrapeConfig.golden
+++ b/pkg/prometheus/testdata/ConsulScrapeConfig.golden
@@ -28,7 +28,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
follow_redirects: true
enable_http2: true
relabel_configs:
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DigitalOceanSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DigitalOceanSD.golden
index e23947fc09..cb0b487fcd 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DigitalOceanSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DigitalOceanSD.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
follow_redirects: true
enable_http2: true
port: 9100
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DockerSDConfig.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DockerSDConfig.golden
index 9c6c0a7bfc..e324cc1ce6 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DockerSDConfig.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_DockerSDConfig.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
host: hostAddress
tls_config:
ca_file: /etc/prometheus/certs/secret_default_secret-ca_
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_EurekaSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_EurekaSD.golden
index 1d42a788fa..386889deca 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_EurekaSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_EurekaSD.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
follow_redirects: true
enable_http2: true
refresh_interval: 30s
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HTTPSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HTTPSD.golden
index 76b8e1c347..01e3c8db34 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HTTPSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HTTPSD.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: false
proxy_connect_header:
- header: value
+ header:
+ - value
relabel_configs:
- source_labels:
- job
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HetznerSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HetznerSD.golden
index 925d9fe39c..1a06733238 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HetznerSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_HetznerSD.golden
@@ -11,7 +11,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
role: hcloud
follow_redirects: true
enable_http2: true
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_K8SSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_K8SSD.golden
index aad3451e5c..07c58854d1 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_K8SSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_K8SSD.golden
@@ -12,7 +12,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
follow_redirects: true
enable_http2: true
relabel_configs:
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_KumaSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_KumaSD.golden
index 9cdce9caaf..eccd4bf5de 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_KumaSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_KumaSD.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
server: 127.0.0.1
follow_redirects: true
enable_http2: true
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_NomadSD.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_NomadSD.golden
index fc25c27fd7..d73f53fbc1 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_NomadSD.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_NomadSD.golden
@@ -13,7 +13,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: true
proxy_connect_header:
- header: value
+ header:
+ - value
server: 127.0.0.1
allow_stale: true
namespace: default
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettings.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettings.golden
index e5e86107ee..2aa52b579f 100644
--- a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettings.golden
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettings.golden
@@ -10,7 +10,8 @@ scrape_configs:
no_proxy: 0.0.0.0
proxy_from_environment: false
proxy_connect_header:
- header: value
+ header:
+ - value
relabel_configs:
- source_labels:
- job
diff --git a/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettingsWithMutiProxyConnectHeaderValues.golden b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettingsWithMutiProxyConnectHeaderValues.golden
new file mode 100644
index 0000000000..2a4a1fbc8a
--- /dev/null
+++ b/pkg/prometheus/testdata/ScrapeConfigSpecConfig_ProxySettingsWithMutiProxyConnectHeaderValues.golden
@@ -0,0 +1,23 @@
+global:
+ evaluation_interval: 30s
+ scrape_interval: 30s
+ external_labels:
+ prometheus: default/test
+ prometheus_replica: $(POD_NAME)
+scrape_configs:
+- job_name: scrapeConfig/default/testscrapeconfig1
+ proxy_url: http://no-proxy.com
+ no_proxy: 0.0.0.0
+ proxy_from_environment: false
+ proxy_connect_header:
+ header:
+ - value
+ - value
+ - bar-value
+ token:
+ - value
+ - bar-value
+ relabel_configs:
+ - source_labels:
+ - job
+ target_label: __tmp_prometheus_job_name