diff --git a/pkg/kinflate/example/instances/exampleinstance/Kube-manifest.yaml b/pkg/kinflate/example/instances/exampleinstance/Kube-manifest.yaml new file mode 100644 index 000000000..88ed69785 --- /dev/null +++ b/pkg/kinflate/example/instances/exampleinstance/Kube-manifest.yaml @@ -0,0 +1,38 @@ +# This example is from https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU/edit#heading=h.dr88tktf0e99 + +apiVersion: manifest.k8s.io/v1alpha1 +kind: Manifest +metadata: + name: test-infra-mungebot +description: Mungebot config for test-infra repo +namePrefix: test-infra- +# Labels to add to all objects and selectors. +# These labels would also be used to form the selector for apply --prune +# Named differently than “labels” to avoid confusion with metadata for this object +objectLabels: + app: mungebot + org: kubernetes + repo: test-infra +objectAnnotations: + note: This is a test annotation +resources: +- ../../package +#These are strategic merge patch overlays in the form of API resources +patches: +- deployment.yaml +#There could also be configmaps in Base, which would make these overlays +configmaps: +- type: env + namePrefix: app-env + file: app.env +- type: file + namePrefix: app-config + file: app-init.ini +#There could be secrets in Base, if just using a fork/rebase workflow +secrets: +- type: tls + namePrefix: app-tls + certFile: tls.cert + keyFile: tls.key +recursive: false +prune: true # I’d make this the default diff --git a/pkg/kinflate/example/instances/exampleinstance/deployment.yaml b/pkg/kinflate/example/instances/exampleinstance/deployment.yaml new file mode 100644 index 000000000..055f1d01b --- /dev/null +++ b/pkg/kinflate/example/instances/exampleinstance/deployment.yaml @@ -0,0 +1,13 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: mungebot +spec: + replicas: 2 + template: + spec: + containers: + - name: nginx + image: nginx:1.7.9 + - name: busybox + image: busybox diff --git a/pkg/kinflate/example/package/Kube-descriptor.yaml b/pkg/kinflate/example/package/Kube-descriptor.yaml new file mode 100644 index 000000000..a26036374 --- /dev/null +++ b/pkg/kinflate/example/package/Kube-descriptor.yaml @@ -0,0 +1,14 @@ +# This example is from https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU/edit#heading=h.dr88tktf0e99 + +# Inspired by https://github.com/kubernetes/helm/blob/master/docs/charts.md +# But Kubernetes API style +apiVersion: manifest.k8s.io/v1alpha1 +kind: Descriptor +metadata: + name: mungebot +description: Mungegithub package +# These are search keywords +keywords: [github, bot, kubernetes] +home: https://github.com/bgrant0607/mungebot-pkg/blob/master/README.md +sources: https://github.com/bgrant0607/mungebot-pkg +icon: https://github.com/bgrant0607/mungebot-pkg/blob/master/icon.png diff --git a/pkg/kinflate/example/package/Kube-manifest.yaml b/pkg/kinflate/example/package/Kube-manifest.yaml new file mode 100644 index 000000000..e8ebf95f2 --- /dev/null +++ b/pkg/kinflate/example/package/Kube-manifest.yaml @@ -0,0 +1,14 @@ +# This example is from https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU/edit#heading=h.dr88tktf0e99 + +# Inspired by https://github.com/kubernetes/helm/blob/master/docs/charts.md +# But Kubernetes API style +apiVersion: manifest.k8s.io/v1alpha1 +kind: Manifest +metadata: + name: mungebot +resources: +- deployment.yaml +#Recursive would be similar to kubectl --recursive behavior, extended to look for Kube-manifest.yaml +recursive: false +#Whether PersistentVolumeClaims should be deleted with the other resources +ownPersistentVolumeClaims: true diff --git a/pkg/kinflate/example/package/deployment.yaml b/pkg/kinflate/example/package/deployment.yaml new file mode 100644 index 000000000..9582b0056 --- /dev/null +++ b/pkg/kinflate/example/package/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: mungebot + labels: + app: mungebot +spec: + replicas: 1 + template: + metadata: + labels: + app: mungebot + spec: + containers: + - name: nginx + image: nginx + env: + - name: foo + value: bar + ports: + - containerPort: 80