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

Allow configuration of API server through config file #214

Merged
merged 1 commit into from
Aug 12, 2022
Merged

Allow configuration of API server through config file #214

merged 1 commit into from
Aug 12, 2022

Conversation

CathalOConnorRH
Copy link
Contributor

Prep work for TEP-0117 to allow future configuration options through config file.

This change allows for both config file options and env var options, where the env var will override the config file option if it is set.

@tekton-robot tekton-robot requested review from dibyom and a user August 2, 2022 10:42
@tekton-robot tekton-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 2, 2022
@tekton-robot
Copy link

Hi @CathalOConnorRH. 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.

Comment on lines +53 to +54
DB_USER string `mapstructure:"DB_USER"`
DB_PASSWORD string `mapstructure:"DB_PASSWORD"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to allow DB credentials to be stored in plaintext? Will Viper also allow these to be set with env vars, and the other settings to be populated via the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's optional to have the password in the config file, if a config item is set as a env var, viper will use that over the config file version [1] AutomaticEnv.

1. AutomaticEnv

cmd/api/main.go Outdated Show resolved Hide resolved
@adambkaplan
Copy link
Contributor

A question for the maintainers (@dibyom, perhaps) - is it worth updating the api.yaml manifest to mount a ConfigMap with a config file that contains non-sensitive info (example - db name, address, protocol?)

@dibyom
Copy link
Member

dibyom commented Aug 4, 2022

A question for the maintainers (@dibyom, perhaps) - is it worth updating the api.yaml manifest to mount a ConfigMap with a config file that contains non-sensitive info (example - db name, address, protocol?)

Sounds good as long as we don't allow passwords over config maps

@dibyom
Copy link
Member

dibyom commented Aug 4, 2022

/ok-to-test

@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 Aug 4, 2022
cmd/api/README.md Outdated Show resolved Hide resolved
Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 11, 2022
@dibyom dibyom closed this Aug 11, 2022
@dibyom dibyom reopened this Aug 11, 2022
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

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 merged commit 8e00733 into tektoncd:main Aug 12, 2022
@enarha
Copy link
Contributor

enarha commented Feb 27, 2023

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 27, 2023
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/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.

None yet

5 participants