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

Feature/helm chart #437

Merged
merged 2 commits into from
Dec 24, 2023
Merged

Conversation

ganievs
Copy link
Contributor

@ganievs ganievs commented Jul 27, 2023

Add the ability to generate the operator's chart from manifests

@ganievs ganievs mentioned this pull request Jul 27, 2023
@ganievs ganievs force-pushed the feature/helm-chart branch from 5fbfee6 to f07354d Compare August 7, 2023 08:48
charts/temporal-operator/Chart.yaml Outdated Show resolved Hide resolved
charts/temporal-operator/Chart.yaml Outdated Show resolved Hide resolved
charts/temporal-operator/templates/deployment.yaml Outdated Show resolved Hide resolved
@@ -0,0 +1,8 @@
apiVersion: cert-manager.io/v1
Copy link
Owner

Choose a reason for hiding this comment

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

I think we could add a condition to create this issuer or not.
Users can choose to not use cert-manager Issuer to create webhook's certs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add certissue: true in the values file to make it optional.

Copy link
Owner

Choose a reason for hiding this comment

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

Why and ? Isn't {{- if .Values.certissue }} enough ?

Copy link
Owner

Choose a reason for hiding this comment

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

What do you think about .Values.webhook.certManager.selfSignedIssuer.enabled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point and what do you think if certissue values will look like this?

  certManager:
    certificate:
      enabled: true
      useCustomIssuer: false
      # Issuer references if you want to use custom issuer
      # In other case will be used selfSigned issuer
      issuerRef: {}

charts/temporal-operator/values.yaml Outdated Show resolved Hide resolved
@yujunz
Copy link
Contributor

yujunz commented Aug 29, 2023

@ganievs any update for the pull request? We would like to adopt helm chart for the increasing complexity of multiple temporal operator.

@ganievs
Copy link
Contributor Author

ganievs commented Aug 29, 2023

@ganievs any update for the pull request? We would like to adopt helm chart for the increasing complexity of multiple temporal operator.

HI @yujunz! I'm going to make the changes proposed by @alexandrevilain in a few days.

Copy link
Owner

@alexandrevilain alexandrevilain left a comment

Choose a reason for hiding this comment

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

Thanks for the update @ganievs !
I still have some comments but it starts to become really cool!

Makefile Outdated Show resolved Hide resolved
Makefile Outdated
@@ -169,6 +169,11 @@ artifacts: kustomize
$(KUSTOMIZE) build config/crd > ${RELEASE_PATH}/temporal-operator.crds.yaml
$(KUSTOMIZE) build config/default > ${RELEASE_PATH}/temporal-operator.yaml

.PHONY: artifacts
helm: manifests helmify
Copy link
Owner

Choose a reason for hiding this comment

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

As you've overwritten the generated chart, are the new Makefile targets still useful ? IMO we can remove them.
Helmify was just a bootstraping tool, am I wrong ?

Copy link
Owner

Choose a reason for hiding this comment

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

Hum this target could still be revelent to push new CRDS to the helm chart when preparing release ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems the helmify is unnecessary in this case. Enough to copy ${RELEASE_PATH}/temporal-operator.crds.yaml to the chart's crds directory.

charts/temporal-operator/Chart.yaml Outdated Show resolved Hide resolved
@@ -0,0 +1,8 @@
apiVersion: cert-manager.io/v1
Copy link
Owner

Choose a reason for hiding this comment

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

Why and ? Isn't {{- if .Values.certissue }} enough ?

@@ -0,0 +1,8 @@
apiVersion: cert-manager.io/v1
Copy link
Owner

Choose a reason for hiding this comment

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

What do you think about .Values.webhook.certManager.selfSignedIssuer.enabled ?

certissue: true
imagePullSecrets: []
kubernetesClusterDomain: cluster.local
webhookService:
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
webhookService:
webhook:
service:

What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Rendamed

@alexandrevilain
Copy link
Owner

alexandrevilain commented Sep 5, 2023

Once everything is ready, could you please squash your commits ? Thanks :)

@alexandrevilain
Copy link
Owner

Hi @ganievs !
Something went wrong with your squash ? I see only two files to review now

@ganievs ganievs force-pushed the feature/helm-chart branch from 793a994 to 8e8029c Compare October 2, 2023 06:57
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ganievs
Copy link
Contributor Author

ganievs commented Oct 2, 2023

Hi @ganievs ! Something went wrong with your squash ? I see only two files to review now

Hi, @alexandrevilain sorry for the inconvenience. I forgot to add the chart directory.

@bjet007
Copy link

bjet007 commented Nov 9, 2023

Hi @ganievs, thank's for the contribution. I did the the helm chart with 0.15.4 and before merging the CRD should be updated.

@ganievs
Copy link
Contributor Author

ganievs commented Nov 13, 2023

HI @bjet007! Done.

@bjet007
Copy link

bjet007 commented Nov 22, 2023

Hi @ganievs, since 0.16.0 is out, I guess the MR should be updated again to match the CRD?

@alexandrevilain do you have an ETA to merge it back into master and be published at the same time than your release?

allowPrivilegeEscalation: false
image:
repository: ghcr.io/alexandrevilain/temporal-operator
tag: v0.13.3
Copy link

Choose a reason for hiding this comment

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

The tag here does not match the appVersion bumped to v0.15.4

@alexandrevilain
Copy link
Owner

@alexandrevilain do you have an ETA to merge it back into master and be published at the same time than your release?

Yes sorry, it went under the radar. I have to double check for this PR content again and merge it asap.

@bjet007
Copy link

bjet007 commented Nov 22, 2023

@alexandrevilain do you have an ETA to merge it back into master and be published at the same time than your release?

Yes sorry, it went under the radar. I have to double check for this PR content again and merge it asap.

No problem, found a small issue with the image tag not matching the chart appVersion which lead to running 0.13.0 operator while chart is 0.15.4.

@ganievs
Copy link
Contributor Author

ganievs commented Nov 27, 2023

@alexandrevilain do you have an ETA to merge it back into master and be published at the same time than your release?

Yes sorry, it went under the radar. I have to double check for this PR content again and merge it asap.

No problem, found a small issue with the image tag not matching the chart appVersion which lead to running 0.13.0 operator while chart is 0.15.4.

Removed tag definition from values.yaml. Now image tag is the same as appVersion by default

@alexandrevilain
Copy link
Owner

Hi @ganievs !
Could you please rebase and squash your commits ?
Then I'll be able to review your PR :)

- args: {{- toYaml .Values.manager.args | nindent 8 }}
command:
- /manager
image: {{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag | default .Chart.AppVersion }}
Copy link

Choose a reason for hiding this comment

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

The default .Chart.AppVersion will not work because it lacks the v prefix
i.e. ghcr.io/alexandrevilain/temporal-operator:0.16.0 does not exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @Nepoxx! Thanks for highlight, fixed

@ganievs ganievs force-pushed the feature/helm-chart branch 3 times, most recently from 0bcb180 to 06632b8 Compare December 22, 2023 14:14
Signed-off-by: Shamil Ganiev <ganiev@pm.me>
@ganievs
Copy link
Contributor Author

ganievs commented Dec 22, 2023

Hi @ganievs ! Could you please rebase and squash your commits ? Then I'll be able to review your PR :)

done

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@alexandrevilain
Copy link
Owner

Thanks @ganievs ! This PR is now approved ! Waiting for the CI to pass.
If I remember well this PR provided github actions too ? I can't see it right now, is this a rebase issue ?

@alexandrevilain alexandrevilain merged commit d7c1a39 into alexandrevilain:main Dec 24, 2023
9 checks passed
@ElanHasson
Copy link
Contributor

Congratulations on this great milestone!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants