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

helm mode: add clustermesh enable/disable #1527

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

asauber
Copy link
Member

@asauber asauber commented Apr 21, 2023

Two commits for review

Add cilium clustermesh {enable,disable} using Helm

Implements a version of clustermesh enable and clustermesh disable using Helm actions run directly against the cluster

Enable Helm mode matrix for multicluster tests

Enables a workflow matrix for "classic" and "helm" mode for multicluster tests using GKE. The recently added parameter for cilium_cli_mode in the cilium-cli-test-job-chart is used.

@asauber asauber marked this pull request as ready for review April 21, 2023 02:42
@asauber asauber requested review from a team as code owners April 21, 2023 02:42
@asauber asauber force-pushed the pr/asauber/helm-clustermesh branch from 6c4aa3d to 1d674a9 Compare April 21, 2023 02:45
@asauber asauber force-pushed the pr/asauber/helm-clustermesh branch from 1d674a9 to cc39c3a Compare April 21, 2023 02:48
@asauber asauber force-pushed the pr/asauber/helm-clustermesh branch from cc39c3a to 1ee3fe9 Compare April 21, 2023 02:49
@asauber asauber temporarily deployed to ci April 21, 2023 02:50 — with GitHub Actions Inactive
@asauber asauber changed the title Add cilium clustermesh {enable,disable} using Helm helm mode: add cilium clustermesh {enable,disable} Apr 21, 2023
@asauber asauber changed the title helm mode: add cilium clustermesh {enable,disable} helm mode: add clustermesh enable/disable Apr 21, 2023
@asauber asauber marked this pull request as draft April 21, 2023 02:55
@asauber asauber force-pushed the pr/asauber/helm-clustermesh branch from 1ee3fe9 to ea0fe4d Compare April 21, 2023 03:10
@asauber asauber temporarily deployed to ci April 21, 2023 03:10 — with GitHub Actions Inactive
@asauber asauber marked this pull request as ready for review April 21, 2023 03:13
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

lgtm maybe add some unit tests for ParseVals

internal/helm/helm.go Show resolved Hide resolved
@asauber asauber temporarily deployed to ci April 21, 2023 15:39 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 21, 2023 15:48 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 21, 2023 16:09 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 21, 2023 16:41 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 21, 2023 17:23 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 21, 2023 18:09 — with GitHub Actions Inactive
@asauber asauber marked this pull request as draft April 21, 2023 19:07
@asauber asauber temporarily deployed to ci April 21, 2023 19:18 — with GitHub Actions Inactive
@asauber asauber temporarily deployed to ci April 24, 2023 18:04 — with GitHub Actions Inactive
Implements a version of `clustermesh enable` and `clustermesh disable` using
Helm actions run directly against the cluster

Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
Enables a matrix for "classic" and "helm" mode for multicluster tests
using GKE. The recently added parameter for "cilium_cli_mode" in the
cilium-cli-test-job-chart is used.

Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
@asauber asauber force-pushed the pr/asauber/helm-clustermesh branch from 0e18420 to a4bb01b Compare April 24, 2023 18:55
@asauber asauber temporarily deployed to ci April 24, 2023 18:55 — with GitHub Actions Inactive
@asauber
Copy link
Member Author

asauber commented Apr 24, 2023

The new workflow was temporarily enabled on this PR for testing purposes. Logs for a successful run of the modified and new workflow can be found here:

(classic) https://github.com/cilium/cilium-cli/actions/runs/4789575696/jobs/8517609808?pr=1527
(helm) https://github.com/cilium/cilium-cli/actions/runs/4789575696/jobs/8517609980?pr=1527

Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
@asauber asauber temporarily deployed to ci April 24, 2023 19:43 — with GitHub Actions Inactive
@asauber asauber marked this pull request as ready for review April 24, 2023 20:18
Copy link
Member

@YutaroHayakawa YutaroHayakawa left a comment

Choose a reason for hiding this comment

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

Approved with 1 question.

},
}

cmd.Flags().StringVar(&params.ServiceType, "service-type", "LoadBalancer", "Type of Kubernetes service to expose control plane { ClusterIP | LoadBalancer | NodePort }")
Copy link
Member

Choose a reason for hiding this comment

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

This changes the default value from the old behavior. Did you have any reason you wanted to change the default?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe I chose LoadBalancer here, because some version of the clustermesh setup docs (which I can't seem to find at the moment), specified --service-type NodePort, as though LoadBalancer was the default.

The default does appear to be NodePort https://github.com/cilium/cilium/blob/main/install/kubernetes/cilium/values.yaml#L2385

I'll change this to NodePort.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your consideration. I would also like to know which of the cilium-cli and Helm defaults we should preserve. I don't know the overall direction of this work, but if we use the old cilium-cli default, the default is an empty string, and cilium-cli does auto-detection depending on the environment (https://github.com/cilium/cilium-cli/blob/main/clustermesh/clustermesh.go#L111-L135). In your new logic, you cut out the auto-detection logic. Is it expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the current direction for much of this autodetection logic is to replace it with documentation, as it has been a source of bugs.

Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
@asauber asauber temporarily deployed to ci April 26, 2023 19:03 — with GitHub Actions Inactive
@michi-covalent
Copy link
Contributor

@brlbil ping!

Copy link
Contributor

@brlbil brlbil left a comment

Choose a reason for hiding this comment

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

CI parts looks good

@michi-covalent
Copy link
Contributor

it's green, there i click.

@michi-covalent michi-covalent merged commit f17f0fc into main Apr 27, 2023
12 checks passed
@michi-covalent michi-covalent deleted the pr/asauber/helm-clustermesh branch April 27, 2023 21:37
@asauber asauber self-assigned this May 23, 2023
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.

None yet

4 participants