-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(skaffold): Add Skaffold configuration Also introduce the CONTRIBUTING.md file, which provides instruction about running it. * Update CONTRIBUTING.md Co-authored-by: Jesper Svendsen <99078145+jesper7@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Jesper Svendsen <99078145+jesper7@users.noreply.github.com> * Apply review --------- Co-authored-by: Marcin Jasion <mjasion@users.noreply.github.com> Co-authored-by: Jesper Svendsen <99078145+jesper7@users.noreply.github.com>
- Loading branch information
1 parent
b5d0739
commit 3d59ad4
Showing
7 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.tgz | ||
override.yaml | ||
.idea | ||
/charts/studio/local-values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## Development environment | ||
|
||
Get the latest development version. Fork and clone the repo: | ||
|
||
```cli | ||
$ git clone git@github.com:<your-username>/helm-charts.git | ||
``` | ||
Install [Helm](https://helm.sh/docs/intro/install/) and [Skaffold](https://skaffold.dev/docs/install/). | ||
|
||
Install a local Kubernetes cluster: | ||
- [Docker Desktop](https://docs.docker.com/desktop/kubernetes/) - recommended | ||
- [Kind](https://kind.sigs.k8s.io/docs/user/configuration/) - it needs additional configuration | ||
to expose ingress 👇 | ||
- K3d - not supported yet | ||
|
||
|
||
### Kind cluster | ||
Kind does not expose ports by default. To enable this, you need to create the cluster with | ||
the following command: | ||
|
||
```cli | ||
$ kind create cluster --config kind-config.yaml | ||
``` | ||
|
||
That's it. You should be ready to make changes, run tests, and make commits! 🎉 | ||
|
||
## Running skaffold | ||
Run skaffold in the root of the repo: | ||
|
||
```cli | ||
$ skaffold dev | ||
``` | ||
Wait for the deployment to finish. You can check the status of the deployment in console. | ||
When it is ready, open the browser and go to http://localhost. You should see the Studio page. | ||
|
||
> [!NOTE] | ||
> Skaffold contains a configuration to install `ingress-nginx` for kind and | ||
> docker-desktop. The profile will be used automatically when you run skaffold with the `dev` profile | ||
> and the name of the current `kubeContext` matches `kind-*` or `docker-desktop`. | ||
### Skaffold profile - `local` | ||
|
||
If you want to run skaffold with `local` profile, you need to create `local-values.yaml` file in | ||
`charts/studio/local-values.yaml`. The values should contain the overrides for the values of the | ||
chart. | ||
|
||
To use the profile, run skaffold with following command: | ||
|
||
```cli | ||
$ skaffold dev -p local | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 80 | ||
hostPort: 80 | ||
protocol: TCP | ||
- containerPort: 443 | ||
hostPort: 443 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: skaffold/v4beta6 | ||
kind: Config | ||
deploy: | ||
helm: | ||
releases: | ||
- name: studio | ||
chartPath: charts/studio | ||
skipBuildDependencies: false | ||
wait: true | ||
valuesFiles: | ||
- charts/studio/values.yaml | ||
recreatePods: false | ||
upgradeOnChange: true | ||
kubectl: {} | ||
|
||
profiles: | ||
- name: local | ||
patches: | ||
- path: /deploy/helm/releases/0/valuesFiles/1 | ||
value: charts/studio/values-skaffold.yaml | ||
op: add | ||
- name: ingress-docker-desktop | ||
activation: | ||
- kubeContext: docker-desktop | ||
manifests: | ||
kustomize: | ||
paths: | ||
- skaffold/docker-desktop | ||
- name: ingress-kind | ||
activation: | ||
- kubeContext: kind-(.*) | ||
manifests: | ||
kustomize: | ||
paths: | ||
- skaffold/kind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml | ||
|
||
patches: | ||
- patch: |- | ||
- op: remove | ||
path: /spec/template/spec/nodeSelector/ingress-ready | ||
target: | ||
kind: Deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../base/ | ||
patches: | ||
- patch: |- | ||
- op: replace | ||
path: /spec/type | ||
value: LoadBalancer | ||
target: | ||
kind: Service | ||
name: ingress-nginx-controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../base/ |