Skip to content

cmd/k8s-operator: allow to install operator via helm - #9920

Merged
irbekrm merged 1 commit into
mainfrom
irbekrm/helmchart
Oct 30, 2023
Merged

irbekrm merged 1 commit into
mainfrom
irbekrm/helmchart

Conversation

@irbekrm

@irbekrm irbekrm commented Oct 23, 2023 •

Copy link
Copy Markdown
Contributor

Initial helm manifests with basic configurability.

To try this out:

  1. run helm package ./cmd/k8s-operator/deploy/chart (users won't have to do this once we have published charts)
  2. either create a Secret with operator oauth creds or put the creds in ./cmd/k8s-operator/deploy/chart/values.yaml (or create a new values file)
  3. (if required) edit any other values you want to change in values file
  4. run helm install operator -n tailscale -f <path-to-values-file> tailscale-operator-0.1.0.tgz
  5. observe the operator be successfully deployed in tailscale namespace

The next step will be to set up some basic infra to serve the chart as well as a flow to publish new chart versions.
Updates #9222

There will definitely be lots of additional configuration options that we'll want to add- this PR does not aim to cover them all, but rather to get the initial template in so that we have something.

@irbekrm
irbekrm force-pushed the irbekrm/helmchart branch 3 times, most recently from b09ce4b to cba579e Compare October 23, 2023 11:42
hostname: "tailscale-operator"
nodeSelector:
kubernetes.io/os: linux
resources: {}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I took out the resource request that we had. I think it does not make sense to have these values here- the actual requests will depend on the amount and size of resources that the operator needs to parse, so users would have to figure it out for themselves anyway. These requests were a lot higher than a user who just wants to set up a couple proxies would need and were making the deployment to fail on clusters that don't have a large amount of free resources.
For reference bitnami charts, also don't preset resource requests/limits on their charts https://github.com/bitnami/charts/blob/main/bitnami/cert-manager/values.yaml#L129-L131

@irbekrm
irbekrm requested a review from maisem October 23, 2023 12:16
Comment thread tailscale-operator/.helmignore Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we would need to update docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will do after this merges

@irbekrm
irbekrm force-pushed the irbekrm/helmchart branch 2 times, most recently from 5c28fc2 to 1c947f6 Compare October 23, 2023 17:48
@mayakacz

Copy link
Copy Markdown
Contributor

Updates ENG-1837

@irbekrm
irbekrm force-pushed the irbekrm/helmchart branch 2 times, most recently from ead5ed3 to 98ab65c Compare October 25, 2023 14:59
Comment on lines +21 to +29
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "unstable"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@irbekrm @mayakacz @rhealitycheck any thoughts on how we version these?
Should we just follow the tailscale versioning?

@Stelminator Stelminator Oct 26, 2023 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@maisem
https://helm.sh/docs/topics/charts/

version: A SemVer 2 version (required)
appVersion: The version of the app that this contains (optional). Needn't be SemVer. Quotes recommended.

appVersion should likely match the latest stable operator version, so v1.50.1 for the container now. If this changes, bump the patch component of version

version is SemVer for the chart itself. i.e., bump the main version if you're breaking backward compatibility. Bump minor/patch when making any change to the chart. 0.1.0 would be appropriate for the first merge (0.x.y indicating that it's not really done). This is (mostly) independent of appVersion (exception noted above). For example, if the entire chart got refactored, that's probably a major version change, but it wouldn't be a tailscale major version. Conversely, there might not be any structural changes to the chart for a very long time, making it forward compatible with tailscale v3.1.2.

Here's a couple of examples:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we just follow the tailscale versioning?

Yes, previously I have bumped this every time I release a new chart version to make sure the right images get pulled.
This is also the tag of the operator and proxy images so I've set this to unstable here because that's what we currently have in the plain manifests.

It doesn't really matter what versions are there in this PR because we aren't actually going to publish with these versions.Once we set up infra to actually publish charts we'll have to have a discussion about publishing flow and versioning. And before we publish we'll have to bump these anyway.

@irbekrm irbekrm Oct 26, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

wrt to the chart version, I am not sure whether we are likely to be publishing new chart versions outside of Tailscale release flow. If we do not, then having the same app and chart version is fine. We did that for cert-manager for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually, thinking about it, we shouldn't need to ever bump it here. It should be ok that both appVersion and version are dummy values and we set them at publish time helm package <path> --app-version v0.52.0 --version v0.52.0.
See i.e https://github.com/cert-manager/cert-manager/blob/master/deploy/charts/cert-manager/Chart.template.yaml#L3-L5
I've set the proxy tag in values.yaml to "" to ensure that unstable does not override appVersion that we default to.

Initial helm manifests.

Updates #9222

Signed-off-by: Irbe Krumina <[email protected]>
Co-authored-by: Maisem Ali <[email protected]>
Signed-off-by: Irbe Krumina <[email protected]>

type: application

maintainers:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we have some kind of 'maintainers' email address that we could put here

@irbekrm

irbekrm commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

irbekrm force-pushed the irbekrm/helmchart branch from ced0293 to 895a5ce
2 minutes ago

Added ability to specify a digest for operator/proxy images and added a couple things (keywords etc) to Chart.yaml

@irbekrm
irbekrm merged commit ed1b935 into main Oct 30, 2023
@irbekrm
irbekrm deleted the irbekrm/helmchart branch October 30, 2023 18:18
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.

4 participants