Skip to content
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

"[e2e] "imagePullPolicy: Always" and "--metrics-bind-addr=127.0.0.1:8080" replacements not needed anymore?" #3055

Open
invidian opened this issue Jan 3, 2022 · 15 comments
Labels
area/testing Issues or PRs related to testing kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@invidian
Copy link
Member

invidian commented Jan 3, 2022

/kind bug

What steps did you take and what happened:

While playing with e2e configuration, I noticed that patterns for replacement in upstream manifests may not be applies to used manifests, as upstream manifests no longer include such patterns.

Logs:

$ for i in --metrics-bind-addr=127.0.0.1:8080 --metrics-bind-addr= 'imagePullPolicy:|Always' imagePullPolicy:; do i=$(echo $i | sed 's/|/ /g'); for j in $(git grep -B 10 -- "${i}" | grep https | awk '{print $3}' | sed 's/"//g' | sort -u); do echo "Matches for pattern '${i}' in ${j}"; curl -s -L $j | grep -- "${i}"; done; done
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/core-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/bootstrap-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/control-plane-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/core-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/bootstrap-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/control-plane-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/core-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/bootstrap-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/control-plane-components.yaml
Matches for pattern '--metrics-bind-addr=127.0.0.1:8080' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/core-components.yaml
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/core-components.yaml
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/bootstrap-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/control-plane-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/core-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/bootstrap-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/control-plane-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/core-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.1.0-beta.1/bootstrap-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.1.0-beta.1/control-plane-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.1.0-beta.1/core-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/bootstrap-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/control-plane-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/core-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20220101/bootstrap-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20220101/control-plane-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern '--metrics-bind-addr=' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20220101/core-components.yaml
        - --metrics-bind-addr=localhost:8080
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/core-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/bootstrap-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/control-plane-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/core-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/bootstrap-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/control-plane-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/core-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/bootstrap-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/control-plane-components.yaml
Matches for pattern 'imagePullPolicy: Always' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/core-components.yaml
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/core-components.yaml
        imagePullPolicy: IfNotPresent
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/bootstrap-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/control-plane-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.4/core-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/bootstrap-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/control-plane-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.2/core-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/bootstrap-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/control-plane-components.yaml
        imagePullPolicy: IfNotPresent
Matches for pattern 'imagePullPolicy:' in https://storage.googleapis.com/artifacts.k8s-staging-cluster-api.appspot.com/components/nightly_main_20211122/core-components.yaml
        imagePullPolicy: IfNotPresent

What did you expect to happen:

I'd expect one of 3 things:

  • If patterns are no longer needed, they should be removed.
  • If patterns are desired, there should be tests covering their requirement (e.g. in case of --metrics-bind-addr, metrics should be queried as part of e2e test suite to verify they are exposed)
  • If patterns to are included as a preventive measure, they should be annotated with comment with reasoning, as their effect is not measurable.

Anything else you would like to add:

It seems in revision 80ddb77, replace statements were indeed doing something:

$ curl -s -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.10/bootstrap-components.yaml | grep -- --metrics-addr=127.0.0.1:8080
        - --metrics-addr=127.0.0.1:8080
        - --metrics-addr=127.0.0.1:8080

Additionally, perhaps CAPI test framework should generate a warning when replacement is not applied or replacement should have a configurable option to fail when no matches are found. Do you think it's worth creating an issue in CAPI repo for this?

Environment:

  • Cluster-api-provider-aws version: 6711661
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 3, 2022
@sedefsavas
Copy link
Contributor

We still have those fields in the manifests published, is this only related to e2e tests?

@sedefsavas sedefsavas added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jan 24, 2022
@invidian
Copy link
Member Author

Yes, this is only for e2e tests, as it is only about CAPI manifests, not CAPA.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 24, 2022
@invidian
Copy link
Member Author

/remove-lifecycle stale

This seems to me like something which should be addressed by maintainers.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 25, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 24, 2022
@invidian
Copy link
Member Author

It seems it's related to local development #3225?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 23, 2022
@invidian
Copy link
Member Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 23, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 21, 2022
@invidian
Copy link
Member Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 21, 2022
@Ankitasw
Copy link
Member

I think this should have been solved by #3225 , isn't it @invidian ?

@invidian
Copy link
Member Author

I think this should have been solved by #3225 , isn't it @invidian ?

I don't think so. I still see:

          replacements:
            - old: "imagePullPolicy: Always"
              new: "imagePullPolicy: IfNotPresent"
            - old: --metrics-bind-addr=127.0.0.1:8080
              new: --metrics-bind-addr=:8080

For example for source https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.6/core-components.yaml in test/e2e/data/e2e_conf.yaml, which does not contain those statements. So as far as I understand, this replacements should be treated appropriately, as mentioned in opening post.

@dlipovetsky
Copy link
Contributor

/area testing
/retitle "[e2e] "imagePullPolicy: Always" and "--metrics-bind-addr=127.0.0.1:8080" replacements not needed anymore?"
/triage accepted
/kind cleanup
/priority important-longterm

@k8s-ci-robot k8s-ci-robot changed the title "imagePullPolicy: Always" and "--metrics-bind-addr=127.0.0.1:8080" replacements not needed anymore? "[e2e] "imagePullPolicy: Always" and "--metrics-bind-addr=127.0.0.1:8080" replacements not needed anymore?" Dec 12, 2022
@k8s-ci-robot k8s-ci-robot added area/testing Issues or PRs related to testing triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Dec 12, 2022
@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 12, 2022
@Ankitasw Ankitasw removed the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jul 3, 2023
@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jul 2, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

6 participants