Skip to content

chore: add new deploy job for new dogfood #10852

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

Merged
merged 9 commits into from
Dec 1, 2023
Merged

Conversation

deansheather
Copy link
Member

@deansheather deansheather commented Nov 24, 2023

Changes the build-main-image job to be just build, and now pushes helm packages to https://helm.coder.com/v2/preview on every push to main.

One problem I foresee is that the index will grow very big very quickly but Helm doesn't have a good method of clearing old releases so I'm not sure what the best plan of attack is.

I'm also unsure how to make Flux always pick the latest pushed version either without making github actions edit the manifests directly in the other repo. I'm guessing we need to mangle the version somehow to make it prefer the newest helm package.

@matifali
Copy link
Member

Why do we need a new helm chart? We can just re deploy from the chart we already have on main using GitHub actions.
a helm upgrade command will always pull the latest image if we set imagePull policy: always.

@deansheather
Copy link
Member Author

@matifali If we don't deploy the helm chart from main then we can't dogfood changes to the helm chart. It's not as important as the image obviously but we should still be running the latest helm chart to find bugs or try new helm features out

@matifali
Copy link
Member

If we deploy from the main branch as we do for PR deployments, aren't we using the latest helm chart currently existing on the main branch?

Something like:

helm upgrade --install "pr${{ env.PR_NUMBER }}" ./helm/coder \
--namespace "pr${{ env.PR_NUMBER }}" \
--values ./pr-deploy-values.yaml \
--force

@deansheather
Copy link
Member Author

It won't look like that since it's all in Flux but I can try something along the same lines

@matifali
Copy link
Member

matifali commented Nov 24, 2023

@deansheather OK. I am not experienced with Flux, so I am excited about it. Thank you for doing this :)
Another approach can be to manage it using Helm only without using Flux.

johnstcn
johnstcn approved these changes Nov 24, 2023
@johnstcn
Copy link
Member

It won't look like that since it's all in Flux but I can try something along the same lines

That approach would also work, but having a separate Helm chart for coder-preview does make it easier to just install the 'latest' version of Coder from the Helm chart without having to worry about overriding the image.

@matifali
Copy link
Member

We can also move our wsproxies to fly.io VMs, then they can use the same coder-preview image, and we can simplify our logic considerably.

@deansheather
Copy link
Member Author

We can also move our wsproxies to fly.io VMs, then they can use the same coder-preview image, and we can simplify our logic considerably.

We're not touching proxies for now, but if we're moving them we'd probably just move them to the dedicated servers that we already have in each of these regions

Comment on lines 751 to 758
flux --namespace flux-system reconcile source git flux-system
flux --namespace flux-system reconcile source git coder-main
flux --namespace flux-system reconcile kustomization flux-system
flux --namespace flux-system reconcile kustomization cert-manager
flux --namespace flux-system reconcile kustomization cert-manager-issuers
flux --namespace flux-system reconcile kustomization coder-certs
flux --namespace flux-system reconcile kustomization coder
flux --namespace flux-system reconcile source chart coder-coder
Copy link
Member

Choose a reason for hiding this comment

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

I could never find a way to tell Flux to just reconcile ALL THE THINGS :(

Comment on lines +17 to +21
"" = "tcp://dogfood-ts-cdr-dev.tailscale.svc.cluster.local:2375"
"us-pittsburgh" = "tcp://dogfood-ts-cdr-dev.tailscale.svc.cluster.local:2375"
"eu-helsinki" = "tcp://reinhard-hel-cdr-dev.tailscale.svc.cluster.local:2375"
"ap-sydney" = "tcp://hildegard-sydney-cdr-dev.tailscale.svc.cluster.local:2375"
"sa-saopaulo" = "tcp://oberstein-sao-cdr-dev.tailscale.svc.cluster.local:2375"
Copy link
Member

Choose a reason for hiding this comment

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

This is really cool <3

@deansheather deansheather merged commit 15875a7 into main Dec 1, 2023
@deansheather deansheather deleted the dean/dogfood-v2 branch December 1, 2023 11:16
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants