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

Updates helm to 3.6.3 #123

Merged
merged 2 commits into from
Aug 10, 2021
Merged

Updates helm to 3.6.3 #123

merged 2 commits into from
Aug 10, 2021

Conversation

stinkyfingers
Copy link
Contributor

Description

Updates helm dep to 3.6.3, addressing a vulnerability in <3.6.1. This required updating sigs.k8s.io/controller-runtime to v0.9.5. This change required updates to the Reconciler signatures and Mock Clients. The most common change was a switch from runtime.Object to client.Object. The client.Object inherits the runtime.Object, so their should be no effect. Tested locally and via integration tests.

Fixes # 1692

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (documentation addition or typo, file relocation)

Testing

  • New tests were added with this PR that prove my fix is effective or that my feature works (describe below this bullet)
  • This change requires no testing (i.e. documentation update)

Documentation

  • All added public packages, funcs, and types have been documented with doc comments
  • I have commented my code, particularly in hard-to-understand areas

Final Checklist:

  • I followed standard GitHub flow guidelines
  • I have performed a self-review of my own code
  • My changes generate no new warnings

k8sClient client.Client
}

func setup(reader templates.Reader, helm Helm, objects []runtime.Object) (*testingContext, error) {
var cancel context.CancelFunc
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think if we return cancel as part of *testingContext to avoid using global vars?

type testingContext struct {
	env *envtest.Environment
	cancel context.CancelFunc
	context.Context
	k8sClient client.Client
}

func setup(reader templates.Reader, helm Helm, objects []client.Object) (*testingContext, error) {
	cancelCtx, cancel := context.WithCancel(context.Background())

	ctx := &testingContext{
		cancel: cancel,
		Context: cancelCtx,
		env: &envtest.Environment{
			CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
		},
	}

}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great call. I'm embarrassed I didn't see it.

@stinkyfingers stinkyfingers merged commit 29be584 into main Aug 10, 2021
@stinkyfingers stinkyfingers deleted the shipa-1692 branch August 10, 2021 13:53
stinkyfingers added a commit that referenced this pull request Aug 10, 2021
Updates helm to 3.6.3 (#123)

* updates helm dep to 3.6.3 and all other things that depend on that version

* put cancelfunc on context in setup

finish updates
stinkyfingers added a commit that referenced this pull request Aug 12, 2021
* converts k8s v1beta1 to v1

Updates helm to 3.6.3 (#123)

* updates helm dep to 3.6.3 and all other things that depend on that version

* put cancelfunc on context in setup

finish updates

* try using envvar
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.

2 participants