Skip to content

add warning for dup ports in containers[*].ports #113245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2023

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Oct 21, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

duplicate {port,protocol} items in ports list (#59119, #58477, #47249)

Which issue(s) this PR fixes:

fix part of #94626

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add warning for dup ports update/patching in pod's container ports

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 21, 2022
@k8s-ci-robot
Copy link
Contributor

@pacoxu: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Oct 21, 2022
@pacoxu pacoxu force-pushed the dup-ports-warning branch from 9c5964e to cff7010 Compare October 21, 2022 09:17
},
},
expected: []string{
`spec.ports[2].port: service has duplicate ports: 443`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same port different protocol is legit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have validation on this

Copy link
Member Author

@pacoxu pacoxu Oct 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a warning, not an error. (For legal configuration, a warning is also not needed most times.)
#47249 (comment)
I think this will cover the patch problem.

In this case, a user may face problems due to the merge key (cannot be port + protocol). So we need a warning.

I am still not sure when should we add this warning. Only if this is an update on ports which have dup ports and update is related?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems we should add it only on patches #105610 (comment) per @liggitt comments

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i may update the pr then.

Copy link
Member Author

@pacoxu pacoxu Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may add the warning to the bad/wrong place.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
          name: a
          protocol: TCP
          hostPort: 10080
        - containerPort: 80
          name: a1
          protocol: UDP
          hostPort: 10080
        - containerPort: 443
          name: b
          protocol: UDP
          hostPort: 20080
      - name: nginx-1
        image: nginx:1.14.2
        ports:
        - containerPort: 443
          protocol: UDP
          name: b1
          hostPort: 40080
        - containerPort: 443
          protocol: UDP
          name: b2
          hostPort: 30080

create a pod based on the yaml above.

        - containerPort: 443
          protocol: TCP
          name: b3
          hostPort: 30080

Add it at the end of the yaml and apply again. (As Jordon pointed out, it should be a client-side apply.)

[root@paco ~]# kubectl get deployment.apps/nginx -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":
{"app":"nginx"},"name":"nginx","namespace":"default"},"spec":{"replicas":3,"selector":{"matchLabels":
{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":
[{"image":"nginx:1.14.2","name":"nginx","ports":
[{"containerPort":80,"hostPort":10080,"name":"a","protocol":"TCP"},
{"containerPort":80,"hostPort":10080,"name":"a1","protocol":"UDP"},
{"containerPort":443,"hostPort":20080,"name":"b","protocol":"UDP"}]},
{"image":"nginx:1.14.2","name":"nginx-1","ports":
[{"containerPort":443,"hostPort":40080,"name":"b1","protocol":"UDP"},
{"containerPort":443,"hostPort":30080,"name":"b2","protocol":"UDP"},
{"containerPort":443,"hostPort":30080,"name":"b3","protocol":"TCP"}]}]}}}}
  creationTimestamp: "2022-10-24T04:51:16Z"
  generation: 2
  labels:
    app: nginx
  name: nginx
  namespace: default
  resourceVersion: "1596289"
  uid: 18dfffd6-8370-42d1-8560-bcb9182dab34
spec:
  progressDeadlineSeconds: 600
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: nginx
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:1.14.2
        imagePullPolicy: IfNotPresent
        name: nginx
        ports:
        - containerPort: 80
          hostPort: 10080
          name: a
          protocol: TCP
        - containerPort: 80
          hostPort: 10080
          name: a1
          protocol: UDP
        - containerPort: 443
          hostPort: 20080
          name: b
          protocol: UDP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      - image: nginx:1.14.2
        imagePullPolicy: IfNotPresent
        name: nginx-1
        ports:
        - containerPort: 443
          hostPort: 40080
          name: b1
          protocol: UDP
        - containerPort: 443
          hostPort: 30080
          name: b2
          protocol: UDP

You can see b3 port in annotation, but it is de-duped during patching.

Copy link
Member Author

@pacoxu pacoxu Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example of a scenario where we need to add a warning.

I1024 11:33:34.512706    9813 request.go:1073] Request Body: {"spec":{"$setElementOrder/containers":
[{"name":"nginx"},{"name":"nginx-1"}],"containers":[{"$setElementOrder/ports":[{"containerPort":443},
{"containerPort":443},{"containerPort":443}],"name":"nginx-1","ports":
[{"containerPort":443,"name":"b3","protocol":"TCP"},{"containerPort":443,"hostPort":30080,"name":"b2"},
{"containerPort":443,"hostPort":40080,"name":"b1","protocol":"UDP"}]}]}}
I1024 11:33:34.512775    9813 round_trippers.go:463] PATCH https://10.6.177.41:6443/api/v1/namespaces/default/pods/nginx?fieldManager=kubectl-client-side-apply&fieldValidation=Strict
I1024 11:33:34.512793    9813 round_trippers.go:469] Request Headers:
I1024 11:33:34.512810    9813 round_trippers.go:473]     Accept: application/json
I1024 11:33:34.512824    9813 round_trippers.go:473]     Content-Type: application/strategic-merge-patch+json
I1024 11:33:34.512839    9813 round_trippers.go:473]     User-Agent: kubectl/v1.25.0 (linux/amd64) kubernetes/a866cbe
I1024 11:33:34.517354    9813 round_trippers.go:574] Response Status: 200 OK in 4 milliseconds
I1024 11:33:34.517386    9813 round_trippers.go:577] Response Headers:
I1024 11:33:34.517403    9813 round_trippers.go:580]     Cache-Control: no-cache, private
I1024 11:33:34.517416    9813 round_trippers.go:580]     Content-Type: application/json
I1024 11:33:34.517429    9813 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 941450d9-e05c-43ec-a527-92b985e02847
I1024 11:33:34.517442    9813 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: 22d95732-37d0-429c-8e14-6c27f0fbb8c7
I1024 11:33:34.517454    9813 round_trippers.go:580]     Content-Length: 3412
I1024 11:33:34.517465    9813 round_trippers.go:580]     Date: Mon, 24 Oct 2022 03:33:34 GMT
I1024 11:33:34.517478    9813 round_trippers.go:580]     Audit-Id: 0bcdcb6b-6ac4-402c-a3f9-ff171119b68b

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[root@paco ~]# cat patch.yaml
spec:
  template:
    spec:
      containers:
      - name: nginx-1
        ports:
        - containerPort: 443
          protocol: UDP
          name: b1
          hostPort: 40080
        - containerPort: 443
          protocol: UDP
          name: b2
          hostPort: 30080
        - containerPort: 443
          protocol: TCP
          name: b3
          hostPort: 30080

[root@paco ~]# kubectl --v=8  patch deployments.apps --type=strategic nginx --patch-file patch.yaml
I1024 13:01:40.864347    9338 request.go:1073] Request Body: {"spec":{"template":{"spec":{"containers":
[{"name":"nginx-1","ports":[{"containerPort":443,"hostPort":40080,"name":"b1","protocol":"UDP"},
{"containerPort":443,"hostPort":30080,"name":"b2","protocol":"UDP"},
{"containerPort":443,"hostPort":30080,"name":"b3","protocol":"TCP"}]}]}}}}

### deploy yaml after applying
        - image: nginx:1.14.2
          imagePullPolicy: IfNotPresent
          name: nginx-1
          ports:
          - containerPort: 443
            hostPort: 30080
            name: b3
            protocol: TCP
          - containerPort: 443
            hostPort: 30080
            name: b2
            protocol: UDP
          resources: {}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the warning is if you are using client-side apply to create (can we detect via the annotation?) or strategic merge patch to update (not sure we have visibility to that here) or maybe are putting duplicate ports in a list in an object that is managed by client-side apply (maybe can tell if the annotation is present), you should stop using client-side apply

@liggitt warning according to the applied annotation is doable.
Or can we add the warning to kubectl client? The logic would be too special.

Or we can do something similar to #92437, just add a warning when deleteMatchingEntries remove an entry with merge key('port' or 'containerPort').

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Warning only if it is an update and there are duplicated ports.

  • service update
  • podTemplate update for ds/deploy/job
  • pod update is intended to be empty

https://github.com/kubernetes/kubernetes/blob/9184a7e43bf5f82847ef22d137eb0ae8b65bb29b/pkg/registry/core/pod/strategy.go#L148-L155

@pacoxu pacoxu marked this pull request as draft October 21, 2022 09:24
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2022
@pacoxu pacoxu marked this pull request as ready for review October 21, 2022 09:27
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2022
@aojea
Copy link
Member

aojea commented Oct 21, 2022

/assign @aojea @thockin @khenidak

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to adding good tests, but I think much of this is "allowed"

@@ -243,6 +243,17 @@ func warningsForPodSpecAndMeta(fieldPath *field.Path, podSpec *api.PodSpec, meta
}
}
}
// duplicate containers[*].ports
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 points:

  1. Shouldn't this be ACROSS containers in a pod?
  2. You need to compare with protocol. It's legit to have the same port number on both TCP and UDP
  3. I think there are people who rely on this - specifically multiple hostPort definitions that point to the same containerPort

I don't think this is actually a warning unless the ENTIRE port block (containerPort, hostPort, protocol, ...) are identical, which I think is already an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Shouldn't this be ACROSS containers in a pod?

for the client-side apply / strategic merge patch, across containers is not needed?

  • You need to compare with protocol. It's legit to have the same port number on both TCP and UDP

The code check protocol+hostip+hostport.

func AccumulateUniqueHostPorts(containers []core.Container, accumulator *sets.String, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
for ci, ctr := range containers {
idxPath := fldPath.Index(ci)
portsPath := idxPath.Child("ports")
for pi := range ctr.Ports {
idxPath := portsPath.Index(pi)
port := ctr.Ports[pi].HostPort
if port == 0 {
continue
}
str := fmt.Sprintf("%s/%s/%d", ctr.Ports[pi].Protocol, ctr.Ports[pi].HostIP, port)
if accumulator.Has(str) {
allErrs = append(allErrs, field.Duplicate(idxPath.Child("hostPort"), str))
} else {
accumulator.Insert(str)
}
}
}
return allErrs
}

  • I think there are people who rely on this - specifically multiple hostPort definitions that point to the same containerPort

multiple hostPort for the same port is valid.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the 3rd question,

[root@paco ~]# cat diffHostPort.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx-1
        image: nginx:1.14.2
        ports:
        - containerPort: 443
          protocol: UDP
          name: b1
          hostPort: 40080
        - containerPort: 443
          protocol: UDP
          name: b2
          hostPort: 30080

[root@paco ~]# kubectl apply --server-side=true -f diffHostPort.yaml
Error from server: failed to create manager for existing fields: failed to convert new object 
(default/nginx; apps/v1, Kind=Deployment) to smd typed:
 .spec.template.spec.containers[name="nginx-1"].ports: duplicate entries for key [containerPort=443,protocol="UDP"]

[root@paco ~]# kubectl apply --server-side=false -f diffHostPort.yaml
deployment.apps/nginx unchanged

It may be weried to users here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error from server: failed to create manager for existing fields: failed to convert new object
(default/nginx; apps/v1, Kind=Deployment) to smd typed:
.spec.template.spec.containers[name="nginx-1"].ports: duplicate entries for key [containerPort=443,protocol="UDP"]

@apelisse this is fun... what's the expected/recommended recovery path for a user trying to fix an error like that using server-side apply? Do they have to use update or client-side apply to fix the error before they can use server-side apply?

Copy link
Member

@apelisse apelisse Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the existing object is "invalid" (at least from SSAs perspective), there's no way server-side apply is going to be able to process it, so yeah, I think one would have to fix it with edit/csa/some sort of update/patch before being able to SSA.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uggh. Yeah, it sure weems like the validation lets things through that are not covered by the set of +listMapKey defined. Is it safe to edit the listMapKeys? We never could do that with patchMergeKey because we didn't know what clients are out there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#113482 to track

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the listMapKeys are correct, what's incorrect is the validation, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, people use multiple duplicate blocks with different hostPort pointing at the same containerPort. It's weird, but I have seen it in the wild.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I've seen that too now that you mention it. We could possibly use [name,port,protocol] as the key then? I need to think of the implications of doing that.

if len(ports) > 1 {
servicePorts := sets.NewInt64()
for i, port := range ports {
if servicePorts.Has(int64(port.Port)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as above - this is not a warning, it's a feature.

},
},
expected: []string{
`spec.ports[2].port: service has duplicate ports: 443`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can warn about ambiguity BEFORE client-side-apply ruins it all, then yes. But I think same-port, same-protocol, different targetPort is legit?

@pacoxu pacoxu marked this pull request as draft October 24, 2022 08:05
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 24, 2022
@thockin
Copy link
Member

thockin commented Oct 31, 2022

Can we go back to basics - what problem are we solving?

@thockin
Copy link
Member

thockin commented Oct 31, 2022 via email

@pacoxu
Copy link
Member Author

pacoxu commented Jul 14, 2023

This logic has become very twisty. I tried to simplify it in https://go.dev/play/p/wJXJGdZXJ_M (and I caught another related case :)

Can you start from that logic and see if I missed anything? Feel free to steal it for this PR, if it works. I think I got all the cases and it's simpler to comprehend (to me, anyway) than this. I beefed it up with some more comments.

Thanks for the demo code. The logic is much clearer. I updated it according to your sample.

@pacoxu
Copy link
Member Author

pacoxu commented Jul 14, 2023

/test pull-kubernetes-e2e-gce

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Just a few small points. Thanks!!

for _, other := range others {
if port.HostIP == other.port.HostIP && port.HostPort == other.port.HostPort {
// Exactly-equal is obvious. Validation should already filter for this except when these are unspecified.
warnings = append(warnings, fmt.Sprintf("duplicate ports: %s and %s: %+v", fldPath.Child("ports").Index(i), other.field, port))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two things:

  1. please make the error like "%s: duplicate port definition with %s", fldPath.Child("ports").Index(i), other.field
  2. Don't use the %+v dumps - that was just for running in playground :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

					if port.HostIP == other.port.HostIP && port.HostPort == other.port.HostPort {
						// Exactly-equal is obvious. Validation should already filter for this except when these are unspecified.
						warnings = append(warnings, fmt.Sprintf("%s: duplicate port definition with %s", fldPath.Child("ports").Index(i), other.field))
					} else if port.HostPort == 0 || other.port.HostPort == 0 {
						// HostPort = 0 is redundant with any other value, which is odd but not really dangerous.  HostIP doesn't matter here.
						warnings = append(warnings, fmt.Sprintf("%s: overlapping port definition with %s", fldPath.Child("ports").Index(i), other.field))
					} else if a, b := port.HostIP == "", other.port.HostIP == ""; port.HostPort == other.port.HostPort && ((a || b) && !(a && b)) {
						// If the HostPorts are the same and either HostIP is not specified while the other is not, the behavior is undefined.
						warnings = append(warnings, fmt.Sprintf("%s: dangerously ambiguous port definition with %s", fldPath.Child("ports").Index(i), other.field))
					}

Updated. Thanks.

@pacoxu pacoxu force-pushed the dup-ports-warning branch from fd0731a to 9182644 Compare July 14, 2023 23:08
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So close! Just one issue.

/approve
/hold for one change

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 14, 2023
@pacoxu pacoxu force-pushed the dup-ports-warning branch from 9182644 to df0d51d Compare July 15, 2023 00:02
@pacoxu
Copy link
Member Author

pacoxu commented Jul 15, 2023

So close! Just one issue.

/approve
/hold for one change

Updated.

@thockin Thanks for continuing to review this.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pacoxu, thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2023
@thockin
Copy link
Member

thockin commented Jul 15, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 15, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a38743bba83eaf794429ddd6ef8c7f90550f9e57

@pacoxu
Copy link
Member Author

pacoxu commented Jul 15, 2023

/retest

@pacoxu
Copy link
Member Author

pacoxu commented Jul 15, 2023

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jul 15, 2023

/skip
/retest-required

@k8s-ci-robot k8s-ci-robot merged commit b908e27 into kubernetes:master Jul 15, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 15, 2023
@pacoxu pacoxu changed the title add warning for dup ports in containers[*].ports and service.ports add warning for dup ports in containers[*].ports Jul 31, 2023
@sebhoss
Copy link

sebhoss commented Feb 5, 2024

This sends a warning in case there is an initContainer and a regular container with the same port. That should not be a problem because init containers do not keep running once their job is done and the regular containers start, right?

@thockin
Copy link
Member

thockin commented Feb 6, 2024

sidecars are long-running init containers, so it CAN happen

@sebhoss
Copy link

sebhoss commented Feb 6, 2024

yeah fair point, however we can detect sidecars by looking at the restartPolicy and if none is set, we know it is not a long-running init container and thus can safely use the same port as a regular container?

I'm asking because prometheus-operator currently creates pods with an (short lived) initContainer that uses the same port as a regular container and I'm wondering whether this must be changed in the operator or the warning relaxed here?

simonpasquier added a commit to simonpasquier/prometheus-operator that referenced this pull request May 30, 2024
The Kubernetes API starting from v1.30 will return a warning when a pod
template contains 2 containers exposing the same port number, even
across init and regular containers.

[1] kubernetes/kubernetes#113245

Signed-off-by: Simon Pasquier <[email protected]>
simonpasquier added a commit to simonpasquier/prometheus-operator that referenced this pull request May 30, 2024
The Kubernetes API starting from v1.30 will return a warning when a pod
template contains 2 containers exposing the same port number, even
across init and regular containers.

[1] kubernetes/kubernetes#113245

Signed-off-by: Simon Pasquier <[email protected]>
openshift-merge-bot bot pushed a commit to stolostron/prometheus-operator that referenced this pull request Aug 2, 2024
* fix: ScrapeClass TLSConfig nil pointer exception (prometheus-operator#6507)


Signed-off-by: Simon Pasquier <[email protected]>

* Update .github/workflows/stale.yaml

Co-authored-by: Jayapriya Pai <[email protected]>

* build(deps): bump github.com/prometheus/common from 0.52.3 to 0.53.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.52.3 to 0.53.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.52.3...v0.53.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump golang.org/x/net from 0.21.0 to 0.23.0 in /scripts

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](golang/net@v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0 in /pkg/client

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](golang/net@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore:cut v0.73.2

Signed-off-by: Jayapriya Pai <[email protected]>

Co-authored-by: Simon Pasquier <[email protected]>

* chore: update RELEASE.md instructions (prometheus-operator#6539)

* chore: update RELEASE.md instructions

Signed-off-by: Jayapriya Pai <[email protected]>

* Update RELEASE.md

Co-authored-by: Arthur Silva Sens <[email protected]>

---------

Signed-off-by: Jayapriya Pai <[email protected]>
Co-authored-by: Arthur Silva Sens <[email protected]>

* update golangci-lint version (prometheus-operator#6543)

Signed-off-by: dongjiang1989 <[email protected]>

* feat(xds): Add support nomad service discovery to the ScrapeConfig CRD (prometheus-operator#6485)

* add support for nomad sd

Signed-off-by: dongjiang1989 <[email protected]>

* fix generate checks

Signed-off-by: Jayapriya Pai <[email protected]>

* build(deps): bump golangci/golangci-lint-action from 4.0.0 to 5.0.0 (prometheus-operator#6547)

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v4.0.0...v5.0.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump helm/kind-action from 1.9.0 to 1.10.0

Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](helm/kind-action@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: bump k8s libs to v0.30.0

Signed-off-by: Simon Pasquier <[email protected]>

* chore: refactor the assets package

This commit simplifies the API of the assets package. To limit the
impact, it tackles only Basic Auth secrets for now.

Previous API:

```
// storing the credentials from function A
err = store.AddBasicAuth(ctx, namespace, httpConfig.BasicAuth, "some key")

// retrieving the credentials from function B
basicAuth := store.BasicAuthAssets["some key"]
```

New API:

```
// storing the credentials from function A
err = store.AddBasicAuth(ctx, namespace, httpConfig.BasicAuth)

// retrieving the credentials from function B
s := store.ForNamespace(namespace)
username, err := s.GetSecretKey(basicAuth.Username)
password, err := s.GetSecretKey(basicAuth.Password)
```

The main simplification is that function B doesn't need to know how
function A built the key value. It also makes testing more decoupled and
reduces the risk of leaking data across namespaces.

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump sigs.k8s.io/controller-runtime from 0.17.3 to 0.18.0

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.17.3 to 0.18.0.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.17.3...v0.18.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Chore: Change *RelabelConfigs to values instead of Pointers  (prometheus-operator#6479)

Signed-off-by: Simon Pasquier <[email protected]>

---------

Signed-off-by: Simon Pasquier <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]>

* doc: fix sample port name used

* build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.1.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.0

Bumps google.golang.org/protobuf from 1.33.0 to 1.34.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: refactor OAuth2 in the assets package

This is the follow-up of prometheus-operator#6537 for OAuth2 credentials.

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump sigs.k8s.io/controller-runtime from 0.18.0 to 0.18.1

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.0 to 0.18.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.18.0...v0.18.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump github.com/thanos-io/thanos from 0.34.1 to 0.35.0

Bumps [github.com/thanos-io/thanos](https://github.com/thanos-io/thanos) from 0.34.1 to 0.35.0.
- [Release notes](https://github.com/thanos-io/thanos/releases)
- [Changelog](https://github.com/thanos-io/thanos/blob/main/CHANGELOG.md)
- [Commits](thanos-io/thanos@v0.34.1...v0.35.0)

---
updated-dependencies:
- dependency-name: github.com/thanos-io/thanos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* feat: add Go runtime scheduler metrics

Signed-off-by: Simon Pasquier <[email protected]>

* chore: add link to public calendar (prometheus-operator#6564)

Signed-off-by: Simon Pasquier <[email protected]>

* Add testing steps for podman with kind (prometheus-operator#6509)

* chore: Add testing instructions for using Podman with Kind

* chore: fixing typos

* Update formatting according to the failing checks.

* Removed whitespace to match the standard.

* Updating according to the suggestions from review.

* update prometheus version

Signed-off-by: dongjiang1989 <[email protected]>

* build(deps): bump golangci/golangci-lint-action from 5.1.0 to 5.3.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5.1.0 to 5.3.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v5.1.0...v5.3.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: make TLSConfig fields optional

This commit changes the `serverName` and `insecureSkipVerify` fields of
TLS configuration to pointers instead of values.

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump sigs.k8s.io/controller-runtime from 0.18.1 to 0.18.2

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.1 to 0.18.2.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.18.1...v0.18.2)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump golang.org/x/net from 0.24.0 to 0.25.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](golang/net@v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: apply TLS scrape class to all objects

Before this change, the TLS configuration from the scrape class wasn't
applied to the generated configuration for PodMonitor, ScrapeConfig and
Probe objects.

Closes prometheus-operator#6556

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump google.golang.org/protobuf from 1.34.0 to 1.34.1

Bumps google.golang.org/protobuf from 1.34.0 to 1.34.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* update thanos version

Signed-off-by: dongjiang1989 <[email protected]>

* fix mistake by make generate

Signed-off-by: dongjiang1989 <[email protected]>

* build(deps): bump golangci/golangci-lint-action from 5.3.0 to 6.0.1

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5.3.0 to 6.0.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v5.3.0...v6.0.1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump github.com/prometheus/prometheus from 0.51.2 to 0.52.0

Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.51.2 to 0.52.0.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.51.2...v0.52.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump github.com/prometheus/client_golang

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: deref nil pointer on WebexConfig

Signed-off-by: Yoan Blanc <[email protected]>

* feat: add `go_sync_mutex_wait_total_seconds_total` metric

Signed-off-by: Simon Pasquier <[email protected]>

* chore: update golangci-lint configuration

Signed-off-by: Simon Pasquier <[email protected]>

* chore: update kind version to v0.23.0

Signed-off-by: Simon Pasquier <[email protected]>

* chore: update Prometheus to v2.52.0

Signed-off-by: Simon Pasquier <[email protected]>

* feat(ProxyConfig): Update CRD for ProxyConnectHeader type (prometheus-operator#6541)

* update CRD for ProxyConnectHeader

---------

Signed-off-by: dongjiang1989 <[email protected]>

* Feat: Add `relabel_configs` field to AlertmanagerEndpoints  (prometheus-operator#6467)

* Add RelabelConfigs to AlertmanagerEndpoints

* chore: Update vulnerable dependency golang.org/x/net

Signed-off-by: Arthur Silva Sens <[email protected]>

* chore: bump k8s libraries

Signed-off-by: Simon Pasquier <[email protected]>

* feat(env):  auto set GOMAXPROCS by go.uber.org/automaxprocs (prometheus-operator#6576)


---------

Signed-off-by: dongjiang1989 <[email protected]>

* feat: support SDK auth in AzureSD

Related-to prometheus-operator#6584

Signed-off-by: Jayapriya Pai <[email protected]>

* feat: support SDK auth in AzureAD RemoteWrite

Related-to prometheus-operator#6584

Signed-off-by: Jayapriya Pai <[email protected]>

* Update promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Add structure for feature flags

Signed-off-by: Arthur Silva Sens <[email protected]>

* [WIP] Feat: Add `alert_relabel_configs` to the Prometheus and PrometheusAgent CRD's (prometheus-operator#6450)

* AlertmanagerEndpoints: add alertRelabelingConfigs field to AlertmanagerEndpoints

* alertmanagerEndpoints: wrap errors and fix naming for tests

* fix: attempt to manually revert mistakenly commited code

* chore: cut v0.74.0

Signed-off-by: Simon Pasquier <[email protected]>

* Corrected Documentation for xxxMonitorNamespaceSelector  (prometheus-operator#6605)

Chore: Clarify that null is the default value for Service/PodMonitor selectors

* Reload alert manager when notification templates change (prometheus-operator#6607)

* Reload alert manager when notification templates change

* feat: add automatic GOMAXPROCS to admission webhook

Signed-off-by: Simon Pasquier <[email protected]>

* crd: add support for source pagerduty_config option in AlertMananger CRD (prometheus-operator#6427)

* crd: add support for source pagerduty_config option in AlertMananger CRD

The AlertManager CRD was expected to have 1:1 fields mapped from
https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config
. Currently source was missing so it is added.


---------

Co-authored-by: Jayapriya Pai <[email protected]>

* AlertmanagerEndpoints: Move AlertmanagerEndpoints validation to pkg/prometheus/server

* chore: remove WebTLSConfigError

Signed-off-by: Simon Pasquier <[email protected]>

* chore: rework webconfig package

Signed-off-by: Simon Pasquier <[email protected]>

* Add extra metric relabelings to scrape classes

Signed-off-by: Mathieu Parent <[email protected]>

* bugfix: Fix bug created from race conditions during merge

Signed-off-by: Arthur Silva Sens <[email protected]>

* [CHORE] considering global limits over enforced

Signed-off-by: Nicolas Takashi <[email protected]>

* build(deps): bump sigs.k8s.io/controller-runtime from 0.18.2 to 0.18.3

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.18.2...v0.18.3)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* e2e/framework: Allow setting feature-gates when creating Prometheus-Operator

Signed-off-by: Arthur Silva Sens <[email protected]>

* chore: add slashpai as release shepherd for v0.75

Signed-off-by: Jayapriya Pai <[email protected]>

* Make a cluster of 2 worker nodes for e2e

* [BUGFIX] Fix PrometheusAgent reconciliation for the statefulset changes (prometheus-operator#6615)

* [BUGFIX] Fix PrometheusAgent reconciliation for the statefulset changes

Signed-off-by: junotx <[email protected]>

---------

Signed-off-by: junotx <[email protected]>

* chore: add test for AlertmanagerConfig with subroutes

Signed-off-by: Simon Pasquier <[email protected]>

* Use functional options pattern for Prometheus Controller

Signed-off-by: Arthur Silva Sens <[email protected]>

* ScrapeConfig: Add `JobName` field to the CRD

Co-authored-by: M Viswanath Sai <[email protected]>

* chore: fix testScrapeConfigKubernetesNodeRole()

Signed-off-by: Simon Pasquier <[email protected]>

* chore: bump k8s dependencies for api

regenerate assets

Fixes prometheus-operator#6617

Signed-off-by: Jayapriya Pai <[email protected]>

* [CHORE] allowing kubeconfig as parameter (prometheus-operator#6623)

Signed-off-by: Nicolas Takashi <[email protected]>

* Add feature gate for Prometheus Agent's DaemonSet deployment (prometheus-operator#6626)

* Add feature gate for Prometheus Agent's DaemonSet deployment

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* feat(env): Add automatic memory limit handling (prometheus-operator#6591)

* add auto GOMEMLIMIT

Signed-off-by: dongjiang1989 <[email protected]>


---------

Signed-off-by: dongjiang1989 <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]>

* build(deps): bump github.com/KimMachineGun/automemlimit

Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/KimMachineGun/automemlimit/releases)
- [Commits](KimMachineGun/automemlimit@v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/KimMachineGun/automemlimit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: use a separate port number for init container

The Kubernetes API starting from v1.30 will return a warning when a pod
template contains 2 containers exposing the same port number, even
across init and regular containers.

[1] kubernetes/kubernetes#113245

Signed-off-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* build(deps): bump github.com/prometheus/prometheus from 0.52.0 to 0.52.1

Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.52.0 to 0.52.1.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.52.0...v0.52.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump github.com/thanos-io/thanos from 0.35.0 to 0.35.1

Bumps [github.com/thanos-io/thanos](https://github.com/thanos-io/thanos) from 0.35.0 to 0.35.1.
- [Release notes](https://github.com/thanos-io/thanos/releases)
- [Changelog](https://github.com/thanos-io/thanos/blob/v0.35.1/CHANGELOG.md)
- [Commits](thanos-io/thanos@v0.35.0...v0.35.1)

---
updated-dependencies:
- dependency-name: github.com/thanos-io/thanos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* chore: refactor tokens management in the assets package

This is a follow-up of prometheus-operator#6537 and prometheus-operator#6557.

Signed-off-by: Simon Pasquier <[email protected]>

* chore: add test-e2e-image target to Makefile

This change also simplifies the end-to-end testing instructions.

Signed-off-by: Simon Pasquier <[email protected]>

* Add `mode` field in PrometheusAgent CRD (prometheus-operator#6640)

* Add mode field in PrometheusAgent CRD

* build(deps): bump github.com/prometheus/common from 0.53.0 to 0.54.0

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md)
- [Commits](prometheus/common@v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: refactor sigv4 management in the assets package

This is a follow-up of prometheus-operator#6537 and prometheus-operator#6557 and prometheus-operator#6641.

Signed-off-by: Simon Pasquier <[email protected]>

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* chore: refactor AzureAD management in the assets package

This is a follow-up of prometheus-operator#6537 and prometheus-operator#6557, prometheus-operator#6641 and prometheus-operator#6644.

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump github.com/prometheus-community/prom-label-proxy

Bumps [github.com/prometheus-community/prom-label-proxy](https://github.com/prometheus-community/prom-label-proxy) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/prometheus-community/prom-label-proxy/releases)
- [Changelog](https://github.com/prometheus-community/prom-label-proxy/blob/main/CHANGELOG.md)
- [Commits](prometheus-community/prom-label-proxy@v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus-community/prom-label-proxy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump golang.org/x/net from 0.25.0 to 0.26.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.25.0 to 0.26.0.
- [Commits](golang/net@v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* ScrapeConfig CRD: Add DockerswarmSDConfigs to the ScrapeConfig CRD

* ScrapeConfig: Add LinodeSDConfigs To The ScrapeConfig CRD

* ScrapeConfig CRD: Add PuppetDB Service Discovery Configurations

* build(deps): bump sigs.k8s.io/controller-runtime from 0.18.3 to 0.18.4

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.3 to 0.18.4.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.18.3...v0.18.4)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add NODE_NAME env in config reloader (prometheus-operator#6636)

* Add NODE_NAME env in config reloader

* feat: add `prometheus_operator_feature_gate_info` metric

This change also moves the feature gates to the operator config struct.
It means that after a feature gate is enabled/disabled, the operator
will reconcile the managed Prometheus resources which should be the
right thing to do.

Signed-off-by: Simon Pasquier <[email protected]>

* chore: bump code-generator to v0.30.1

The gen tools arguments have changed a bit, the Makefile commands have
been adjusted accordingly.

Signed-off-by: Simon Pasquier <[email protected]>

* Changed the description for ```overrideHonorLabels``` field (prometheus-operator#6653)

* Changed the decription for overrideHonorLabels

* Update pkg/prometheus/promcfg.go

Co-authored-by: Simon Pasquier <[email protected]>

* build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2

Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity

Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](Azure/azure-sdk-for-go@sdk/internal/v1.5.2...sdk/azcore/v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump imjasonh/setup-crane from 0.3 to 0.4

Bumps [imjasonh/setup-crane](https://github.com/imjasonh/setup-crane) from 0.3 to 0.4.
- [Release notes](https://github.com/imjasonh/setup-crane/releases)
- [Commits](imjasonh/setup-crane@v0.3...v0.4)

---
updated-dependencies:
- dependency-name: imjasonh/setup-crane
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* [Enhancement] Replacing t.Fatal with testify/require package  (prometheus-operator#6659)

chore: pkg/operator: Replace t.Fatal with require.testify

* chore: Add feature-gated tests to CI

Signed-off-by: Arthur Silva Sens <[email protected]>

* ScrapeConfig CRD: Add LightSail Service Discovery Config Options

* chore: bump to k8s.io libs v0.30.2

Signed-off-by: Simon Pasquier <[email protected]>

* build(deps): bump github.com/prometheus-community/prom-label-proxy

Bumps [github.com/prometheus-community/prom-label-proxy](https://github.com/prometheus-community/prom-label-proxy) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/prometheus-community/prom-label-proxy/releases)
- [Changelog](https://github.com/prometheus-community/prom-label-proxy/blob/main/CHANGELOG.md)
- [Commits](prometheus-community/prom-label-proxy@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus-community/prom-label-proxy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Alertmanager pkg,t.Fatal->require pkg

* chore: fix build after prom-label-proxy bump

Signed-off-by: Simon Pasquier <[email protected]>

* Replacing t.fatal with require Package  (prometheus-operator#6680)

chore: Replace t.Fatal with require package

* feat(remote): add support prometheus remote write/read ProxyConfig  (prometheus-operator#6512)

* update prometheus remote write/read proxy config

Signed-off-by: dongjiang1989 <[email protected]>



---------

Signed-off-by: dongjiang1989 <[email protected]>

* WIP: Refactor common test code between Prometheus Agent's StatefulSet and DaemonSet modes (prometheus-operator#6688)

* Refactor test code between Prometheus Agent's StatefulSet and DaemonSet modes

* update default thanos version

Signed-off-by: dongjiang1989 <[email protected]>

* build(deps): bump github.com/prometheus/prometheus from 0.52.1 to 0.53.0

Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.52.1 to 0.53.0.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](prometheus/prometheus@v0.52.1...v0.53.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* update prometheus version

Signed-off-by: dongjiang1989 <[email protected]>

* config-reloader: create correct probes when `listenLocal` is set to `true`

When the prometheus operator is started with `--enable-config-reloader-probes`
it will now create `exec` probes that run curl/wget in the config-reloader
container against localhost to check the /healthz endpoint if `listenLocal` is
set to `true`. Otherwise, it creates `httpGet` probes as before.

Fixes prometheus-operator#6682

* Nit: Check if EnableFeatures already contains agent mode's features (prometheus-operator#6701)

* Check if EnableFeatures already contains ageent mode's features

* [CHORE] Nicolas as release volunteer

Signed-off-by: Nicolas Takashi <[email protected]>

* Add `ttl` obj to alertmanagercfgs resource (prometheus-operator#6515)

* add ttl obj into alertmanagerConfig rsc


---------

Co-authored-by: Nicolas Takashi <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]>

* chore: factorize prober code

This is a quick follow-up of prometheus-operator#6698.

Signed-off-by: Simon Pasquier <[email protected]>

* chore: Replace StringPtrValOrDefault with ptr.Deref

Signed-off-by: Arthur Silva Sens <[email protected]>

* Proposal for DaemonSet deployment of Prometheus Agent (prometheus-operator#6600)

chore: Add Proposal for Daemonset deployment of Prometheus Agent

* chore: refactor TLS management in the assets package

This is a follow-up of prometheus-operator#6537, prometheus-operator#6557, prometheus-operator#6641, prometheus-operator#6644 and prometheus-operator#6645.

Signed-off-by: Simon Pasquier <[email protected]>

* Refactor the common implementation code (not including tests) between Prometheus's modes (prometheus-operator#6686)

* Refactor the common implementation code (not including tests) between Prometheus's modes

* Continue prometheus-operator#6688: Refactor common test code between Prometheus modes (prometheus-operator#6694)

* chore: optimize get secret key from store (prometheus-operator#6700)

* optimize code

Signed-off-by: dongjiang1989 <[email protected]>


---------

Signed-off-by: dongjiang1989 <[email protected]>

* build(deps): bump github.com/go-test/deep from 1.1.0 to 1.1.1

Bumps [github.com/go-test/deep](https://github.com/go-test/deep) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/go-test/deep/releases)
- [Changelog](https://github.com/go-test/deep/blob/master/CHANGES.md)
- [Commits](go-test/deep@v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/go-test/deep
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: bump go dependencies before release

Signed-off-by: Jayapriya Pai <[email protected]>

* feat(xds): Add OVHcloud service discovery to the ScrapeConfig CRD (prometheus-operator#6689)

* add service discovery for ovhcloud

Signed-off-by: dongjiang1989 <[email protected]>

---------

Signed-off-by: dongjiang1989 <[email protected]>

* chore: cut 0.75.0

Signed-off-by: Jayapriya Pai <[email protected]>

* cherry-pick 6722

Signed-off-by: dongjiang1989 <[email protected]>

* chore: cut 0.75.1

Signed-off-by: Jayapriya Pai <[email protected]>

* fix: avoid invalid alerting config with TLS

Signed-off-by: Simon Pasquier <[email protected]>

* chore: cut 0.75.2

Signed-off-by: Jayapriya Pai <[email protected]>

* conflict fix

Signed-off-by: Coleen Iona Quadros <[email protected]>

* conflict

Signed-off-by: Coleen Iona Quadros <[email protected]>

* conflict files

Signed-off-by: Coleen Iona Quadros <[email protected]>

* conflict files

Signed-off-by: Coleen Iona Quadros <[email protected]>

* conflict files

Signed-off-by: Coleen Iona Quadros <[email protected]>

---------

Signed-off-by: Simon Pasquier <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jayapriya Pai <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: Yoan Blanc <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Arthur Silva Sens <[email protected]>
Signed-off-by: Mathieu Parent <[email protected]>
Signed-off-by: Nicolas Takashi <[email protected]>
Signed-off-by: junotx <[email protected]>
Signed-off-by: Coleen Iona Quadros <[email protected]>
Co-authored-by: Kemal Akkoyun <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]>
Co-authored-by: Jayapriya Pai <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Arthur Silva Sens <[email protected]>
Co-authored-by: dongjiang <[email protected]>
Co-authored-by: M Viswanath Sai <[email protected]>
Co-authored-by: Horaci Macias <[email protected]>
Co-authored-by: Kapil Ramwani <[email protected]>
Co-authored-by: Nicolas Takashi <[email protected]>
Co-authored-by: Yoan Blanc <[email protected]>
Co-authored-by: Arthur Silva Sens <[email protected]>
Co-authored-by: Ashwin Sriram <[email protected]>
Co-authored-by: Muhammad Hamza Zaib <[email protected]>
Co-authored-by: mviswanathsai <[email protected]>
Co-authored-by: Mathieu Parent <[email protected]>
Co-authored-by: haanhvu <[email protected]>
Co-authored-by: junot <[email protected]>
Co-authored-by: janluak <_>
Co-authored-by: Ha Anh Vu <[email protected]>
Co-authored-by: Ashwin <[email protected]>
Co-authored-by: Simon Dickhoven <[email protected]>
Co-authored-by: Afzal Ansari <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Coleen Iona Quadros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.