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

Add a minimal nop image #3014

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Add a minimal nop image #3014

merged 1 commit into from
Jul 27, 2020

Conversation

imjasonh
Copy link
Member

This satisfies Tekton's need for a minimal image that will simply exit
immediately (to gracefully stop sidecars), and for a minimal image that
will run indefinitely (to power the Affinity Assistant), and will be
owned and released by Tekton unlike the tianon/true and nginx images it
replaces.

Fixes #2714
Fixes #2640

/cc @sbwsg @jlpettersson

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • [n/a] Includes tests (if functionality changed/added)
  • [y] Includes docs (if user facing)
  • [y] Commit messages follow commit message best practices
  • [y] Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Add a utility image that will be used to gracefully stop sidecars and also support Affinity Assistant StatefulSets.

@tekton-robot tekton-robot requested review from jlpettersson and a user July 27, 2020 15:47
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 27, 2020
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 27, 2020
@imjasonh
Copy link
Member Author

/kind cleanup

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 27, 2020
This satisfies Tekton's need for a minimal image that will simply exit
immediately (to gracefully stop sidecars), and for a minimal image that
will run indefinitely (to power the Affinity Assistant), and will be
owned and released by Tekton unlike the tianon/true and nginx images it
replaces.
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

SGTM, just one question

nopImage = flag.String("nop-image", "tianon/true", "The container image used to stop sidecars")
affinityAssistantImage = flag.String("affinity-assistant-image", "nginx", "The container image used for the Affinity Assistant")
gitImage = flag.String("git-image", "override-with-git:latest",
nopImage = flag.String("nop-image", "override-with-nop:latest", "The container image used to stop sidecars")
Copy link
Member

Choose a reason for hiding this comment

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

Does nop image runs indefinitely ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The image runs in two modes, one which exits immediately (to stop sidecars) and another that runs indefinitely (to support Affinity Assistant). So it can run indefinitely, but for sidecar-stopping it won't, and will just exit immediately.

Copy link
Member

Choose a reason for hiding this comment

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

ohhhhhhhhh I didn't know about that 🙃
Sounds very good then 😝

@vdemeester
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2020
Copy link
Member

@jlpettersson jlpettersson left a comment

Choose a reason for hiding this comment

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

This looks good!

/lgtm

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlpettersson, sbwsg

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2020
@tekton-robot tekton-robot merged commit a81f43d into tektoncd:master Jul 27, 2020
@dlorenc
Copy link
Contributor

dlorenc commented Jul 27, 2020

Nice!

@ghost
Copy link

ghost commented Jul 28, 2020

Will this also need some stuff in the tekton directory to ensure the nop image is built along with our other internal images?

I'm still not super familiar with this stuff but I would guess it needs an entry in resources.yaml and release-pipeline.yaml to ensure it's built and released?

imjasonh added a commit to imjasonh/pipeline that referenced this pull request Jul 28, 2020
This should ensure that the nop-image is built and released alongside
other utility images.

Followup from tektoncd#3014
@imjasonh
Copy link
Member Author

Will this also need some stuff in the tekton directory to ensure the nop image is built along with our other internal images?

I'm still not super familiar with this stuff but I would guess it needs an entry in resources.yaml and release-pipeline.yaml to ensure it's built and released?

Good catch!

#3025

tekton-robot pushed a commit that referenced this pull request Jul 28, 2020
This should ensure that the nop-image is built and released alongside
other utility images.

Followup from #3014
Peaorl pushed a commit to Peaorl/pipeline that referenced this pull request Aug 10, 2020
This should ensure that the nop-image is built and released alongside
other utility images.

Followup from tektoncd#3014
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Remove tianon/true as the "nop" image Create a binary for Affinity Assistant used as a placeholder pod
5 participants