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

Add helm 'values' flags to create dashboard #3990

Merged

Conversation

laupse
Copy link
Contributor

@laupse laupse commented Sep 5, 2023

What changed?
flags --values added to create dashboard and beta run so we can provide additional helm values when generating HelmRelease from the gitopscli

Why was this change made?
Didn't wanted to have to deal with editing the yaml HelmRelease file to add values

How was this change implemented?
This is has been inspired by how it is implemented in flux for creating HelmRelease

How did you validate the change?
with this yaml

# cat weave-gitops-dashboard.yaml
  service:
    type: nodePort
    nodePort: 30000

we have this export from the below command

# go run cmd/gitops/main.go create dashboard ww-gitops --password=password --export --values="./weave-gitops-dashboard.yaml" | tail -25
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  annotations:
    metadata.weave.works/description: This is the Weave GitOps Dashboard.  It provides
      a simple way to get insights into your GitOps workloads.
  name: ww-gitops
  namespace: flux-system
spec:
  chart:
    spec:
      chart: weave-gitops
      sourceRef:
        kind: HelmRepository
        name: ww-gitops
  interval: 1h0m0s
  values:
    adminUser:
      create: true
      passwordHash: $2a$10$fUEMY4RTq4L6H3t2xkmiAOSGSmjxlOuepzoL.dzTDVTlbTtLWFT0S
      username: admin
    service:
      nodePort: 30000
      type: nodePort

Release notes
N/A

Documentation Changes
cli is self documented

@laupse
Copy link
Contributor Author

laupse commented Sep 6, 2023

Hi, sorry i drop this PR from nowhere. I was playing with the gitops cli to create helm flux manifest for the dashboard. And i wanted to add some configuration for the weave dashboard k8s service. I try first to do just like,i would do with flux create helmrelease --values... but there was no equivalent in the gitops cli. So i took a little time to implement.
Hope you find this useful, let me know 😄

@yiannistri yiannistri self-requested a review September 18, 2023 14:21
@yiannistri yiannistri force-pushed the add-values-from-file-to-create-dash branch 6 times, most recently from 6b79eb4 to 5c82a07 Compare October 17, 2023 08:44
@yiannistri
Copy link
Contributor

yiannistri commented Oct 17, 2023

@laupse thank you for sending this PR, the new CLI flag is a useful addition 👍

I took the liberty of editing your PR slightly and I have now asked for another review. But I think it should be good to merge soon.

Copy link
Contributor

@yitsushi yitsushi left a comment

Choose a reason for hiding this comment

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

lgtm

@yiannistri yiannistri force-pushed the add-values-from-file-to-create-dash branch from fbdafe7 to 80c8a10 Compare October 17, 2023 14:14
@yiannistri yiannistri enabled auto-merge (rebase) October 17, 2023 14:14
@yiannistri yiannistri merged commit eaa3920 into weaveworks:main Oct 17, 2023
17 checks passed
@laupse
Copy link
Contributor Author

laupse commented Oct 30, 2023

Thank you for taking time considering and merging this PR 😄

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

Successfully merging this pull request may close these issues.

4 participants