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

Make defaults config map name customizable #2260

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

eddycharly
Copy link
Member

@eddycharly eddycharly commented Mar 21, 2020

This PR makes the defaults config map name customizable.

It allows users to override the defaults config map name by specifying a CONFIG_DEFAULTS_NAME environment variable.

This is already the case for artifacts configurations :

func GetBucketConfigName() string {
if e := os.Getenv("CONFIG_ARTIFACT_BUCKET_NAME"); e != "" {
return e
}
return "config-artifact-bucket"
}
// GetPVCConfigName returns the name of the configmap containing all
// customizations for the storage PVC.
func GetPVCConfigName() string {
if e := os.Getenv("CONFIG_ARTIFACT_PVC_NAME"); e != "" {
return e
}
return "config-artifact-pvc"
}

If the environment variable is not defined, it uses the config-defaults name.

I would like to have this to be able to generate a unique config map name in a helm chart (see tektoncd/experimental#494).

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Mar 21, 2020
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 21, 2020
@tekton-robot
Copy link
Collaborator

Hi @eddycharly. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@eddycharly
Copy link
Member Author

/assign @abayer

@vdemeester
Copy link
Member

/ok-to-test
/cc @imjasonh

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 23, 2020
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.

/lgtm
/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/lgtm
/meow

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.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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 Mar 26, 2020
@tekton-robot tekton-robot merged commit b82fef4 into tektoncd:master Mar 26, 2020
@eddycharly
Copy link
Member Author

eddycharly commented Apr 1, 2020

Strange, it doesn't work with webhook...

error: configmap "config-defaults" not found
stacktrace:

github.com/tektoncd/pipeline/vendor/knative.dev/pkg/injection/sharedmain.MainWithConfig
  github.com/tektoncd/pipeline/vendor/knative.dev/pkg/injection/sharedmain/main.go:199
github.com/tektoncd/pipeline/vendor/knative.dev/pkg/injection/sharedmain.MainWithContext
  github.com/tektoncd/pipeline/vendor/knative.dev/pkg/injection/sharedmain/main.go:114
main.main
  github.com/tektoncd/pipeline/cmd/webhook/main.go:136
runtime.main
  runtime/proc.go:203

@eddycharly
Copy link
Member Author

eddycharly commented Apr 1, 2020

Arf, it wasn't part of the release. My bad, sorry.

@afrittoli afrittoli added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 30, 2020
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants