GoogleContainerTools / GoogleContainerTools/skaffold
Using `skaffold render` with Helm support for GitOps
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
The `skaffold render` command with helm support should render not only manifests but also the `values.yaml` file. Maybe with with additional option such as `--render-helm-values=true`.
### Actual behavior
Assuming I have the following `Deployment`:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{.Values.image.repository }}:{{.Values.image.tag}}"
ports:
- containerPort: {{ .Values.image.containerPort }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
```
And `values.yaml`:
```yaml
image:
repository: piomin/sample-spring-kotlin-microservice
tag: 1.4.0
containerPort: 8080
pullPolicy: IfNotPresent
```
The output for `skaffold render` is:
```yaml
# Source: sample-spring-kotlin-microservice/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-spring-kotlin-microservice
spec:
selector:
matchLabels:
app: sample-spring-kotlin-microservice
template:
metadata:
labels:
app: sample-spring-kotlin-microservice
spec:
containers:
- name: sample-spring-kotlin-microservice
image: "piomin/sample-spring-kotlin-microservice:e91a4325999093bac11084408ed5df6a76a7fadfba16947d3a6358bc7789eb14@sha256:5c336af21c28c829a5f7d6e847d33546efb5b1816f5937f15d282ddba676b003"
ports:
- containerPort: 8080
imagePullPolicy: IfNotPresent
```
### Information
Assuming I have a GitOps process and want to use `skaffold render` to generate content for CI/CD I would like to have `values.yaml` generated and then commit it to the repository.
```shell
$ skaffold build --file-output='abcd.json'
$ skaffold render -a abcd.json
```
Contributor guide
Assessment
This issue has not been assessed yet.