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 existing helm template logic to populate manifests instead of dry-run #1718

Merged
merged 9 commits into from
Sep 17, 2021

Conversation

viveklak
Copy link
Contributor

@viveklak viveklak commented Sep 17, 2021

Fixes #1712

This avoids issues for charts with CRDs which don't play well with dry-run.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

1 similar comment
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@viveklak viveklak changed the title Use existing helm template equivalent logic to populate manifests instead of dry-run Use existing helm template logic to populate manifests instead of dry-run Sep 17, 2021
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@mikhailshilkov mikhailshilkov left a comment

Choose a reason for hiding this comment

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

This makes sense to me, would love @lblackstone to take a look too

repo: "https://prometheus-community.github.io/helm-charts",
},
values: {
commonLabels: {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: add a comment somewhere about the purpose of this test (what step2 is verifying)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

const prometheusRelease = new k8s.helm.v3.Release("prometheus", {
name: "kube-prometheus-stack",
chart: "kube-prometheus-stack",
repositoryOpts: {
Copy link
Member

Choose a reason for hiding this comment

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

We should probably pin to a specific version just in case upstream breaks something in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinned version.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

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

This worked when I tested it locally, but I had a couple questions:

  1. Are we planning to render the manifests in a separate PR? We should have all the info we need to do that now similarly to our Chart support.
  2. I got a number of warnings during the update. Any idea where those are coming from?
    E0917 10:12:09.637652   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1alpha1: the server could not find the requested resource
    E0917 10:12:09.748362   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource
    E0917 10:12:09.777696   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource
    E0917 10:12:09.839002   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource

@viveklak
Copy link
Contributor Author

This worked when I tested it locally, but I had a couple questions:

  1. Are we planning to render the manifests in a separate PR? We should have all the info we need to do that now similarly to our Chart support.

This is tracked in #1701. We have had that support with dry-run as well but maps were not rendering. I can try rendering as formatted yaml instead but that would be in the context of a separate PR.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@viveklak
Copy link
Contributor Author

  1. I got a number of warnings during the update. Any idea where those are coming from?
    E0917 10:12:09.637652   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1alpha1: the server could not find the requested resource
    E0917 10:12:09.748362   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource
    E0917 10:12:09.777696   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource
    E0917 10:12:09.839002   63178 memcache.go:196] couldn't get resource list for monitoring.coreos.com/v1: the server could not find the requested resource

Thanks for pointing that out. I saw them as well. Looks like these were spurious log messages from the stock discovery cache client around CRD installs (perhaps defaulting to stdout). Switched to version in clients and the log messages are gone.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@viveklak
Copy link
Contributor Author

There seems to be something going on with the CI run - Levi and I have independently verified the new test locally and I have run it on an identical GKE cluster to the CI environment. All of them work but it seems the released provider is being somehow pulled into the test run on GHA. I am going to force merge this and watch the master build to see what is up.

@viveklak viveklak merged commit 50b31f2 into master Sep 17, 2021
@pulumi-bot pulumi-bot deleted the vl/HelmReleaseCRD branch September 17, 2021 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't deploy kube-prometheus-stack with helm.v3.Release
3 participants