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

Use controller to reconcile k8s secrets #224

Merged
merged 10 commits into from
Jun 25, 2020

Conversation

aramase
Copy link
Member

@aramase aramase commented Jun 4, 2020

What this PR does / why we need it:

  • Adds a new custom resource SecretProviderClassPodStatus to track the status of the mount for the pod
    • The SecretProviderClassPodStatus is created with the pod as ownerReference
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClassPodStatus
metadata:
 creationTimestamp: "2020-06-02T00:12:38Z"
 generation: 1
 labels:
   internal.secrets-store.csi.k8s.io/node-name: kind-worker
 name: nginx-secrets-store-inline-0-default-azure
 namespace: default
 ownerReferences:
 - apiVersion: v1
   kind: Pod
   name: nginx-secrets-store-inline-0
   uid: d8771ddf-935a-4199-a20b-f35f71c1d9e7
 resourceVersion: "107107"
 selfLink: /apis/secrets-store.csi.x-k8s.io/v1alpha1/namespaces/default/secretproviderclasspodstatuses/nginx-secrets-store-inline-0-default-azure
 uid: 72a0ecb8-c6e5-41e1-8da1-25e37ec61b26
status:
 mounted: true
 podName: nginx-secrets-store-inline-0
 secretProviderClassName: azure
 targetPath: /var/lib/kubelet/pods/d8771ddf-935a-4199-a20b-f35f71c1d9e7/volumes/kubernetes.io~csi/secrets-store-inline/mount

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #188

Special notes for your reviewer:
Design doc: https://docs.google.com/document/d/1EM0Lf-qSdUXdfjOx3AZB9yHOr-lw9_CtoUhR0eTmIwo/edit?usp=sharing

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 4, 2020
@aramase aramase added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 4, 2020
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 4, 2020
@k8s-ci-robot k8s-ci-robot requested a review from ritazh June 4, 2020 18:36
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 4, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2020
@aramase aramase force-pushed the status branch 3 times, most recently from e45c81d to 1b7b8bc Compare June 4, 2020 20:38
pkg/secrets-store/utils.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aramase

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

@aramase
Copy link
Member Author

aramase commented Jun 23, 2020

/test pull-secrets-store-csi-driver-e2e-windows

@@ -55,6 +55,7 @@ setup() {
}

@test "CSI inline volume test" {
skip
Copy link
Member

@ritazh ritazh Jun 25, 2020

Choose a reason for hiding this comment

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

If we want to skip these tests, should we just remove them? Then in a separate PR, remove all references of provider parameters from pod spec. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense! Removed it.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 25, 2020
@aramase
Copy link
Member Author

aramase commented Jun 25, 2020

/wip
/test pull-secrets-store-csi-driver-e2e-windows

@aramase aramase removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2020
@ritazh
Copy link
Member

ritazh commented Jun 25, 2020

/lgtm

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a controller to reconcile secrets
3 participants