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

feat/helmChart: initial support for installing the operator using helm charts #174

Merged
merged 13 commits into from
May 30, 2024

Conversation

nujragan93
Copy link
Contributor

@nujragan93 nujragan93 commented Apr 6, 2024

Hey there 👋

This PR adds initial support for helm chart
#168

Nagarjun Krishnan added 4 commits April 5, 2024 11:35
@onedr0p
Copy link
Contributor

onedr0p commented Apr 6, 2024

Thanks for tackling this @nujragan93 I don't see any workflow changes to publish the Helm chart (e.g. what is done in https://github.com/dragonflydb/dragonfly/blob/main/.github/workflows/docker-release.yml)

Nagarjun Krishnan added 2 commits April 6, 2024 13:58
Signed-off-by: Nagarjun Krishnan <nkrishnan@ancestry.com>
Signed-off-by: Nagarjun Krishnan <nkrishnan@ancestry.com>
@nujragan93
Copy link
Contributor Author

Thanks for tackling this @nujragan93 I don't see any workflow changes to publish the Helm chart (e.g. what is done in https://github.com/dragonflydb/dragonfly/blob/main/.github/workflows/docker-release.yml)

that seems like a OCI repo for dragonflyDb, does the operator need to have a separate repo ? do we need to add tests to the CI before pushing ?

@onedr0p
Copy link
Contributor

onedr0p commented Apr 6, 2024

that seems like a OCI repo for dragonflyDb, does the operator need to have a separate repo ?

They seem to be packaging up the Helm chart into a OCI artifact which could be done here as well and published under https://github.com/orgs/dragonflydb/packages?repo_name=dragonfly-operator

do we need to add tests to the CI before pushing ?

It looks like they have some CI tests in https://github.com/dragonflydb/dragonfly/tree/main/contrib/charts/dragonfly/ci so probably might be a good idea to have some here as well?

nujragan93 and others added 3 commits April 6, 2024 14:15
fix appversion in chart.yaml

Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
Signed-off-by: nujragan93 <159933832+nujragan93@users.noreply.github.com>
Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
Signed-off-by: nujragan93 <159933832+nujragan93@users.noreply.github.com>
Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
Signed-off-by: nujragan93 <159933832+nujragan93@users.noreply.github.com>
@nujragan93
Copy link
Contributor Author

that seems like a OCI repo for dragonflyDb, does the operator need to have a separate repo ?

They seem to be packaging up the Helm chart into a OCI artifact which could be done here as well and published under https://github.com/orgs/dragonflydb/packages?repo_name=dragonfly-operator

do we need to add tests to the CI before pushing ?

It looks like they have some CI tests in https://github.com/dragonflydb/dragonfly/tree/main/contrib/charts/dragonfly/ci so probably might be a good idea to have some here as well?

@Abhra303 @Pothulapati what do you suggest ?

@Pothulapati
Copy link
Collaborator

Hey @nujragan93, Thanks for working on this.

+1 to both of these questions. We can have similar CI linting, generation tests like Dragonfly. Feel free to add a simpler verison of that.

Yep, We should be using Github Packages to store and publish the Helm Chart.

(Reviewing the Helm Chart itself meanwhile)

@nujragan93
Copy link
Contributor Author

nujragan93 commented Apr 10, 2024

Hey @nujragan93, Thanks for working on this.

+1 to both of these questions. We can have similar CI linting, generation tests like Dragonfly. Feel free to add a simpler verison of that.

Yep, We should be using Github Packages to store and publish the Helm Chart.

(Reviewing the Helm Chart itself meanwhile)

@Pothulapati
I have made some workflow changes to push helm chart to github(dont know how to test it)
This PR seems already very big, I feel the ci linting and tests should be made a separate PR.

@onedr0p
Copy link
Contributor

onedr0p commented Apr 10, 2024

@nujragan93 pipeline looks good. FWIW I agree we should separate the PRs for adding ci linting and tests after this is merged.

@onedr0p
Copy link
Contributor

onedr0p commented Apr 17, 2024

@Pothulapati any update here? I tried to cover most the review and it looks good from here.

@onedr0p
Copy link
Contributor

onedr0p commented May 9, 2024

@Pothulapati, or anybody?

Copy link
Collaborator

@Pothulapati Pothulapati left a comment

Choose a reason for hiding this comment

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

Added some nits and questions! Code looks mostly good!

Considering Helm is very errror prone (easy to add formatting errors), We should be adding linting tests like https://github.com/dragonflydb/dragonfly/blob/main/.github/actions/lint-test-chart/action.yml, Otherwise we have no way to make sure these charts actually work. This is very important considering we have so many values, etc.

We can merge it once we see that these tests pass.

Thanks! Really sorry for missing the review on this.

.github/workflows/ci.yml Show resolved Hide resolved
@onedr0p
Copy link
Contributor

onedr0p commented May 18, 2024

Anything I can do here to help move this along @Pothulapati @nujragan93 ?

@Pothulapati
Copy link
Collaborator

@onedr0p Feel free to create a new branch from this branch and add your commits with the changes that I requested i.e test the chart. I'm happy to follow up with a review.

@onedr0p
Copy link
Contributor

onedr0p commented May 28, 2024

@Pothulapati you are a maintainer of this repo which gives you the ability to edit this PR with those said changes. If that's not something you want to do I'll go ahead and create a branch off this and open a PR with your requested changes.

@Pothulapati
Copy link
Collaborator

@Pothulapati you are a maintainer of this repo which gives you the ability to edit this PR with those said changes.

Yes, but that does not mean I have enough bandwidth to work on everything :/

If that's not something you want to do I'll go ahead and create a branch off this and open a PR with your requested changes.

If you are interested, and want to help, Feel free!

@onedr0p onedr0p mentioned this pull request May 28, 2024
@onedr0p
Copy link
Contributor

onedr0p commented May 28, 2024

@Pothulapati After looking this over... there's quite a bit of CI/GitHub workflow changes that need to be done to support what you ask because the workflow you have in this repo is only for releases / pushing to main. There is no testing workflow to expand upon like here https://github.com/dragonflydb/dragonfly/tree/main/.github/workflows

Why is it not possible to merge this PR and iterate on the changes in future updates? As @nujragan93 already mentioned this PR is pretty big already.

@nujragan93
Copy link
Contributor Author

@Pothulapati After looking this over... there's quite a bit of CI/GitHub workflow changes that need to be done to support what you ask because the workflow you have in this repo is only for releases / pushing to main. There is no testing workflow to expand upon like here https://github.com/dragonflydb/dragonfly/tree/main/.github/workflows

Why is it not possible to merge this PR and iterate on the changes in future updates? As @nujragan93 already mentioned this PR is pretty big already.

I agree, if the workflows are setup, then I would jump in and iterate on tests with the helm charts.

@Abhra303 Abhra303 merged commit 1f3a8dd into dragonflydb:main May 30, 2024
2 checks passed
@Pothulapati
Copy link
Collaborator

Sorry folks but this is merged now! Looking forward to the next iterations!

@FlorisFeddema
Copy link

Does this need a new operator release first? Seems like the package is not yet available in the ghcr

@Pothulapati
Copy link
Collaborator

Pothulapati commented Jun 12, 2024

Just FYI, we had to remove the release changes (for now) as it wasn't working #201

@RyanMnM
Copy link

RyanMnM commented Jun 12, 2024

I have a feeling something as simple as git checkout -b as appose to just git checkout may fix that issue.

Or something along those lines.

@alexanderccc
Copy link

@Pothulapati do you need the commit back into the main branch? Assuming it's failing there, I think this might be fixed in 2 ways

Keep the chart and app separate, and have another workflow for helm, this also means having separate versions for the chart which might increase the complexity a bit as there would be 2 different artifacts that need to be maintained and released as part of the same repo with different versions.

Or keep it with matching versions and consider helm as part of the app. Any changes to helm are released with a new version of the app as well (common helm headache) and keep the workflow with sed for version change, login, package and push. For local install (from the cloned repo) there could be a note in the readme stating that the chart and app version need to be updated.

If Helm gets out of hand (which it might), this can be separated into its own repo where you only have the chart.

lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request Jun 12, 2024
…3 ) (patch) (#4865)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[dragonflydb/dragonfly-operator](https://togithub.com/dragonflydb/dragonfly-operator)
| patch | `v1.1.2` -> `v1.1.3` |
| ghcr.io/dragonflydb/operator | patch | `v1.1.2` -> `v1.1.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>dragonflydb/dragonfly-operator
(dragonflydb/dragonfly-operator)</summary>

###
[`v1.1.3`](https://togithub.com/dragonflydb/dragonfly-operator/releases/tag/v1.1.3)

[Compare
Source](https://togithub.com/dragonflydb/dragonfly-operator/compare/v1.1.2...v1.1.3)

Release v1.1.3

Docker image: `docker.dragonflydb.io/dragonflydb/operator:v1.1.3`

This release bumps the default Dragonfly version to v1.19.0, along with
updates to other dependencies. Also, includes some fixes, and support
for custom service name.

##### What's Changed

- fix(resource): add HEALTHCHECK_PORT env in the statefulset by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#175
- build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[dragonflydb/dragonfly-operator#177
- chore(controller): update kube-rbac-proxy version by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#186
- feat(service): add support for custom service name by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#187
- feat/helmChart: initial support for installing the operator using helm
charts by [@&#8203;nujragan93](https://togithub.com/nujragan93) in
[dragonflydb/dragonfly-operator#174
- fix(failover): failover to available replicas if master is not
starting by [@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#189
- fix(dragonfly): Bump version to v1.18.1 by
[@&#8203;Pothulapati](https://togithub.com/Pothulapati) in
[dragonflydb/dragonfly-operator#195
- fix(dragonfly): Bump version to v1.19.0 by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#199
- fix(rbac-proxy): use the correct version by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#198
- feat(version): release v1.1.3 of Operator by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#200
- fix(github): remove helm release action by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#201

**Full Changelog**:
dragonflydb/dragonfly-operator@v1.1.2...v1.1.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJyZW5vdmF0ZS9naXRodWItcmVsZWFzZSIsInR5cGUvcGF0Y2giXX0=-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
kireque pushed a commit to kireque/home-ops that referenced this pull request Jun 12, 2024
…patch) (#658)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.dragonflydb.io/dragonflydb/operator | patch | `v1.1.2` ->
`v1.1.3` |
|
[dragonflydb/dragonfly-operator](https://togithub.com/dragonflydb/dragonfly-operator)
| patch | `v1.1.2` -> `v1.1.3` |

---

### Release Notes

<details>
<summary>dragonflydb/dragonfly-operator
(dragonflydb/dragonfly-operator)</summary>

###
[`v1.1.3`](https://togithub.com/dragonflydb/dragonfly-operator/releases/tag/v1.1.3)

[Compare
Source](https://togithub.com/dragonflydb/dragonfly-operator/compare/v1.1.2...v1.1.3)

Release v1.1.3

Docker image: `docker.dragonflydb.io/dragonflydb/operator:v1.1.3`

This release bumps the default Dragonfly version to v1.19.0, along with
updates to other dependencies. Also, includes some fixes, and support
for custom service name.

##### What's Changed

- fix(resource): add HEALTHCHECK_PORT env in the statefulset by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#175
- build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[dragonflydb/dragonfly-operator#177
- chore(controller): update kube-rbac-proxy version by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#186
- feat(service): add support for custom service name by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#187
- feat/helmChart: initial support for installing the operator using helm
charts by [@&#8203;nujragan93](https://togithub.com/nujragan93) in
[dragonflydb/dragonfly-operator#174
- fix(failover): failover to available replicas if master is not
starting by [@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#189
- fix(dragonfly): Bump version to v1.18.1 by
[@&#8203;Pothulapati](https://togithub.com/Pothulapati) in
[dragonflydb/dragonfly-operator#195
- fix(dragonfly): Bump version to v1.19.0 by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#199
- fix(rbac-proxy): use the correct version by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#198
- feat(version): release v1.1.3 of Operator by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#200
- fix(github): remove helm release action by
[@&#8203;Abhra303](https://togithub.com/Abhra303) in
[dragonflydb/dragonfly-operator#201

**Full Changelog**:
dragonflydb/dragonfly-operator@v1.1.2...v1.1.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJyZW5vdmF0ZS9naXRodWItcmVsZWFzZSIsInR5cGUvcGF0Y2giXX0=-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
@Aym3nTN
Copy link
Contributor

Aym3nTN commented Jul 5, 2024

The fix is easy. Simply addfetch-depth: 0 to actions/checkout@v3 step and git push in the step where you update Chart.yaml file with the tag version.
But the concern here is that the Helm Chart version and Operator version are different, the former is at v1.x.x > and the former at v0.1.x. Not the same, I'd suggest working on improving the version management of both components. I'm opening another issue for this initiative.

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

8 participants