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

DNM: Move secret retrieval to hiveutil for AWS prov/deprov #1872

Conversation

2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Sep 2, 2022

Pods created by hive-controllers require information from secrets and
configmaps (for example, cloud credentials) in order to function. Today
these are passed into the pods from the hive-controllers side via
environment variables and volumes. Working on HIVE-1862, it's looking
like we're going to need that same business logic -- which parts of
which objects are needed in what form -- on the hiveutil side when
running in scale mode. In order to avoid duplication of that logic,
we're considering moving it all to the hiveutil side, even for
non-scale mode.

This experiment is a proof of this concept for provision and deprovision
paths on AWS. The cloud credentials secret contents are no longer passed
through via the pod spec. Instead, the hiveutil command itself uses a
local client to load that secret and set up the same environment
variables and files that were previously passed through on the pod.

Spike related to HIVE-1862

Pods created by hive-controllers require information from secrets and
configmaps (for example, cloud credentials) in order to function. Today
these are passed into the pods from the hive-controllers side via
environment variables and volumes. Working on HIVE-1862, it's looking
like we're going to need that same business logic -- which parts of
which objects are needed in what form -- on the hiveutil side when
running in scale mode. In order to avoid duplication of that logic,
we're considering moving it *all* to the hiveutil side, even for
non-scale mode.

This experiment is a proof of this concept for provision and deprovision
paths on AWS. The cloud credentials secret contents are no longer passed
through via the pod spec. Instead, the hiveutil command itself uses a
local client to load that secret and set up the same environment
variables and files that were previously passed through on the pod.

Spike related to HIVE-1862
@openshift-ci openshift-ci bot requested review from abutcher and dlom September 2, 2022 22:28
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 2, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2022
@2uasimojo
Copy link
Member Author

/hold
experimental.
/cc @abutcher @jaybeeunix @dustman9000

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 2, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2022

@2uasimojo: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@codecov
Copy link

codecov bot commented Sep 3, 2022

Codecov Report

Merging #1872 (99037c5) into master (18fe7fc) will decrease coverage by 0.09%.
The diff coverage is 43.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1872      +/-   ##
==========================================
- Coverage   41.89%   41.80%   -0.10%     
==========================================
  Files         364      364              
  Lines       34096    34087       -9     
==========================================
- Hits        14286    14251      -35     
- Misses      18609    18635      +26     
  Partials     1201     1201              
Impacted Files Coverage Δ
contrib/pkg/deprovision/awstagdeprovision.go 0.00% <0.00%> (ø)
contrib/pkg/utils/aws/aws.go 0.00% <0.00%> (ø)
pkg/installmanager/installmanager.go 33.40% <0.00%> (-0.04%) ⬇️
pkg/install/generate.go 26.70% <100.00%> (-2.76%) ⬇️

@2uasimojo
Copy link
Member Author

This works. I'm going to do it for real via #1874.

@2uasimojo 2uasimojo closed this Sep 6, 2022
@2uasimojo 2uasimojo deleted the HIVE-1862/experiment-move-secret-to-hiveutil branch September 6, 2022 21:54
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant