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

Fixing the helm chart integration tests. #75

Merged

Conversation

phillipsj
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2022
@k8s-ci-robot k8s-ci-robot added sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 23, 2022
@phillipsj phillipsj changed the title [do not merge] testing Fixing the helm chart integration tests. May 24, 2022
@phillipsj phillipsj marked this pull request as ready for review May 24, 2022 02:14
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 24, 2022
@phillipsj
Copy link
Contributor Author

/assign

Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

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

Should we be creating a new package instead of overwriting the existing 0.4.0? I don't know what is considered best practice here for releasing templates

admission-webhook/run-ci.sh Outdated Show resolved Hide resolved
admission-webhook/run-ci.sh Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 25, 2022
@phillipsj
Copy link
Contributor Author

@marosset @jsturtevant I addressed all of your feedback. Thanks for the reviews.

@jsturtevant
Copy link
Contributor

Looks like we now have two folders for charts. I've done some research and it looks like don't need to version the folder that the chart lives in itself which is why we are having a bit of trouble here. Looking at https://v2.helm.sh/docs/developing_charts/#store-charts-in-your-chart-repository (I found this example as well: https://github.com/kubernetes-sigs/cloud-provider-azure/tree/master/helm)

We can have a directory structure like:

- `charts/gmsa` this can have the template files, chart files, vaules.yaml, etc
- `charts/repo` this contains the  index.yaml and tgz files once we want to version them.  

The workflow would be make updates to the charts/gmsa. The PR's wouldn't generate any tgz pacakges. Once we were ready to release and version the chart would could generate the tgz pacakge, move it to the charts/repo and update the index to use the correct version.

The tests themselves would reference the charts/gmsa folder and not use the tgz files. Later we could add a periodic job or maybe modify the integration test to generate a temporary tgz package to deploy to verify that works as well.

Does that make sense?

@jsturtevant
Copy link
Contributor

we could fix the test here, then open a separate PR to move these files around to the correct location which might make more sense.

Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

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

lgtm, Thanks for cleaning all this up. Do we need to update the readme install instructions with the correct url to add the repository?

Test is using the helm chart 🚀

installing helm deployment windows-gmsa-dev with chart /home/runner/work/windows-gmsa/windows-gmsa/charts/gmsa and image :
KUBECONFIG=/home/runner/work/windows-gmsa/windows-gmsa/admission-webhook/dev/kubeconfig-windows-gmsa-chart-integration /usr/local/bin/kubectl create namespace windows-gmsa-dev
namespace/windows-gmsa-dev created
KUBECONFIG=/home/runner/work/windows-gmsa/windows-gmsa/admission-webhook/dev/kubeconfig-windows-gmsa-chart-integration /usr/local/bin/helm version
version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.17.5"}
KUBECONFIG=/home/runner/work/windows-gmsa/windows-gmsa/admission-webhook/dev/kubeconfig-windows-gmsa-chart-integration /usr/local/bin/helm install windows-gmsa-dev /home/runner/work/windows-gmsa/windows-gmsa/charts/gmsa --namespace windows-gmsa-dev
NAME: windows-gmsa-dev
LAST DEPLOYED: Wed May 25 16:13:50 2022
NAMESPACE: windows-gmsa-dev
STATUS: deployed
REVISION: 1
TEST SUITE: None
KUBECONFIG=/home/runner/work/windows-gmsa/windows-gmsa/admission-webhook/dev/kubeconfig-windows-gmsa-chart-integration /usr/local/bin/kubectl wait -n windows-gmsa-dev pod -l app=windows-gmsa-dev --for=condition=Ready
pod/windows-gmsa-dev-6c6b5ddffb-njff4 condition met
make[1]: Leaving directory '/home/runner/work/windows-gmsa/windows-gmsa/admission-webhook'
### Starting integration tests with Kubernetes version: 1.23.4 ###

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 25, 2022
This PR makes tweaks and fixes some assumptions that
prevented the integration test from actually working.

This also re-organizes the charts to a different structure.
@jsturtevant
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2022
@marosset
Copy link
Contributor

@phillipsj
Copy link
Contributor Author

@marosset I would say not yet, I think we need to automate the generation and update of the index.

Copy link
Contributor

@marosset marosset left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marosset, phillipsj

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2022
@k8s-ci-robot k8s-ci-robot merged commit aa85919 into kubernetes-sigs:master May 25, 2022
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. sig/windows Categorizes an issue or PR as relevant to SIG Windows. 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.

4 participants