-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(k8s): enable patching manifests
This change introduces a \`patchResources\` field to the \`kubernetes\` Deploy action that allows users to overwrite the values of manifests in Garden config without modifying the manifest itself. This enables users to drop Garden into existing K8s projects without making any other changes to code or config. Under the hood, Garden uses the `kubectl patch` command. The behaviour is documented here: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/
- Loading branch information
Showing
63 changed files
with
32,462 additions
and
437 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
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
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
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
38 changes: 38 additions & 0 deletions
38
core/test/data/test-projects/kubernetes-type/deploy-action/deployment.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,38 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: busybox-deployment | ||
labels: | ||
app: busybox | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: busybox | ||
template: | ||
metadata: | ||
labels: | ||
app: busybox | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox:1.31.1 | ||
args: [sh, -c, "while :; do sleep 2073600; done"] | ||
env: | ||
- name: FOO | ||
value: banana | ||
- name: BAR | ||
value: "" | ||
- name: BAZ | ||
value: null | ||
ports: | ||
- containerPort: 80 | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: test-configmap | ||
data: | ||
hello: world |
5 changes: 5 additions & 0 deletions
5
core/test/data/test-projects/kubernetes-type/deploy-action/garden.yml
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 @@ | ||
kind: Deploy | ||
type: kubernetes | ||
name: deploy-action | ||
spec: | ||
files: [ "*.yaml" ] |
Oops, something went wrong.