From ad34a704ea5c1053ae0abedb5911f81ed876567f Mon Sep 17 00:00:00 2001 From: arun-vc Date: Tue, 28 Jan 2020 13:49:18 +0100 Subject: [PATCH] more apps --- application-crds/base/crd.yaml | 239 ++++++++++++++++++ application-crds/base/kustomization.yaml | 4 + application-crds/kustomization.yaml | 5 + application/base/cluster-role-binding.yaml | 11 + application/base/cluster-role.yaml | 21 ++ application/base/kustomization.yaml | 29 +++ application/base/params.env | 1 + application/base/params.yaml | 3 + application/base/service-account.yaml | 4 + application/base/service.yaml | 7 + application/base/stateful-set.yaml | 27 ++ application/kustomization.yaml | 15 ++ .../overlays/application/application.yaml | 34 +++ .../overlays/application/kustomization.yaml | 13 + application/overlays/debug/kustomization.yaml | 10 + application/overlays/debug/stateful-set.yaml | 25 ++ apps/templates/application-crds.yaml | 19 ++ apps/templates/application.yaml | 16 ++ apps/templates/jupyter-web-app.yaml | 16 ++ apps/templates/namespaces.yaml | 7 + blue-green/.helmignore | 21 -- blue-green/Chart.yaml | 5 - blue-green/README.md | 30 --- blue-green/templates/NOTES.txt | 19 -- blue-green/templates/_helpers.tpl | 32 --- blue-green/templates/rollout.yaml | 56 ---- blue-green/templates/services.yaml | 40 --- blue-green/values.yaml | 45 ---- guestbook/guestbook-ui-deployment.yaml | 20 -- guestbook/guestbook-ui-svc.yaml | 10 - helm-dependency/Chart.yaml | 1 - helm-dependency/README.md | 55 ---- helm-dependency/requirements.yaml | 4 - helm-dependency/values-nomaria.yaml | 13 - helm-dependency/values.yaml | 7 - helm-guestbook/.helmignore | 21 -- helm-guestbook/Chart.yaml | 5 - helm-guestbook/templates/NOTES.txt | 19 -- helm-guestbook/templates/_helpers.tpl | 32 --- helm-guestbook/templates/deployment.yaml | 52 ---- helm-guestbook/templates/service.yaml | 19 -- helm-guestbook/values-production.yaml | 2 - helm-guestbook/values.yaml | 45 ---- jsonnet-guestbook-tla/guestbook-ui.jsonnet | 65 ----- jsonnet-guestbook/guestbook-ui.jsonnet | 59 ----- jsonnet-guestbook/params.libsonnet | 8 - .../base/cluster-role-binding.yaml | 11 + jupyter-web-app/base/cluster-role.yaml | 54 ++++ jupyter-web-app/base/config-map.yaml | 127 ++++++++++ jupyter-web-app/base/deployment.yaml | 37 +++ jupyter-web-app/base/kustomization.yaml | 70 +++++ jupyter-web-app/base/params.env | 7 + jupyter-web-app/base/params.yaml | 9 + jupyter-web-app/base/role-binding.yaml | 11 + jupyter-web-app/base/role.yaml | 35 +++ jupyter-web-app/base/service-account.yaml | 4 + jupyter-web-app/base/service.yaml | 23 ++ jupyter-web-app/kustomization.yaml | 15 ++ .../overlays/application/application.yaml | 49 ++++ .../overlays/application/kustomization.yaml | 13 + .../overlays/istio/kustomization.yaml | 6 + jupyter-web-app/overlays/istio/params.yaml | 3 + .../overlays/istio/virtual-service.yaml | 24 ++ ksonnet-guestbook/.gitignore | 4 - ksonnet-guestbook/app.yaml | 23 -- .../components/guestbook-ui.jsonnet | 59 ----- ksonnet-guestbook/components/params.libsonnet | 18 -- ksonnet-guestbook/environments/base.libsonnet | 4 - .../environments/default/globals.libsonnet | 2 - .../environments/default/main.jsonnet | 8 - .../environments/default/params.libsonnet | 17 -- .../environments/dev/globals.libsonnet | 2 - .../environments/dev/main.jsonnet | 8 - .../environments/dev/params.libsonnet | 17 -- .../environments/prod/globals.libsonnet | 2 - .../environments/prod/main.jsonnet | 8 - .../environments/prod/params.libsonnet | 17 -- .../guestbook-ui-deployment.yaml | 20 -- kustomize-guestbook/guestbook-ui-svc.yaml | 10 - kustomize-guestbook/kustomization.yaml | 7 - 80 files changed, 1004 insertions(+), 911 deletions(-) create mode 100644 application-crds/base/crd.yaml create mode 100644 application-crds/base/kustomization.yaml create mode 100644 application-crds/kustomization.yaml create mode 100644 application/base/cluster-role-binding.yaml create mode 100644 application/base/cluster-role.yaml create mode 100644 application/base/kustomization.yaml create mode 100644 application/base/params.env create mode 100644 application/base/params.yaml create mode 100644 application/base/service-account.yaml create mode 100644 application/base/service.yaml create mode 100644 application/base/stateful-set.yaml create mode 100644 application/kustomization.yaml create mode 100644 application/overlays/application/application.yaml create mode 100644 application/overlays/application/kustomization.yaml create mode 100644 application/overlays/debug/kustomization.yaml create mode 100644 application/overlays/debug/stateful-set.yaml create mode 100644 apps/templates/application-crds.yaml create mode 100644 apps/templates/application.yaml create mode 100644 apps/templates/jupyter-web-app.yaml delete mode 100644 blue-green/.helmignore delete mode 100644 blue-green/Chart.yaml delete mode 100644 blue-green/README.md delete mode 100644 blue-green/templates/NOTES.txt delete mode 100644 blue-green/templates/_helpers.tpl delete mode 100644 blue-green/templates/rollout.yaml delete mode 100644 blue-green/templates/services.yaml delete mode 100644 blue-green/values.yaml delete mode 100644 guestbook/guestbook-ui-deployment.yaml delete mode 100644 guestbook/guestbook-ui-svc.yaml delete mode 100644 helm-dependency/Chart.yaml delete mode 100644 helm-dependency/README.md delete mode 100644 helm-dependency/requirements.yaml delete mode 100644 helm-dependency/values-nomaria.yaml delete mode 100644 helm-dependency/values.yaml delete mode 100644 helm-guestbook/.helmignore delete mode 100644 helm-guestbook/Chart.yaml delete mode 100644 helm-guestbook/templates/NOTES.txt delete mode 100644 helm-guestbook/templates/_helpers.tpl delete mode 100644 helm-guestbook/templates/deployment.yaml delete mode 100644 helm-guestbook/templates/service.yaml delete mode 100644 helm-guestbook/values-production.yaml delete mode 100644 helm-guestbook/values.yaml delete mode 100644 jsonnet-guestbook-tla/guestbook-ui.jsonnet delete mode 100644 jsonnet-guestbook/guestbook-ui.jsonnet delete mode 100644 jsonnet-guestbook/params.libsonnet create mode 100644 jupyter-web-app/base/cluster-role-binding.yaml create mode 100644 jupyter-web-app/base/cluster-role.yaml create mode 100644 jupyter-web-app/base/config-map.yaml create mode 100644 jupyter-web-app/base/deployment.yaml create mode 100644 jupyter-web-app/base/kustomization.yaml create mode 100644 jupyter-web-app/base/params.env create mode 100644 jupyter-web-app/base/params.yaml create mode 100644 jupyter-web-app/base/role-binding.yaml create mode 100644 jupyter-web-app/base/role.yaml create mode 100644 jupyter-web-app/base/service-account.yaml create mode 100644 jupyter-web-app/base/service.yaml create mode 100644 jupyter-web-app/kustomization.yaml create mode 100644 jupyter-web-app/overlays/application/application.yaml create mode 100644 jupyter-web-app/overlays/application/kustomization.yaml create mode 100644 jupyter-web-app/overlays/istio/kustomization.yaml create mode 100644 jupyter-web-app/overlays/istio/params.yaml create mode 100644 jupyter-web-app/overlays/istio/virtual-service.yaml delete mode 100644 ksonnet-guestbook/.gitignore delete mode 100644 ksonnet-guestbook/app.yaml delete mode 100644 ksonnet-guestbook/components/guestbook-ui.jsonnet delete mode 100644 ksonnet-guestbook/components/params.libsonnet delete mode 100644 ksonnet-guestbook/environments/base.libsonnet delete mode 100644 ksonnet-guestbook/environments/default/globals.libsonnet delete mode 100644 ksonnet-guestbook/environments/default/main.jsonnet delete mode 100644 ksonnet-guestbook/environments/default/params.libsonnet delete mode 100644 ksonnet-guestbook/environments/dev/globals.libsonnet delete mode 100644 ksonnet-guestbook/environments/dev/main.jsonnet delete mode 100644 ksonnet-guestbook/environments/dev/params.libsonnet delete mode 100644 ksonnet-guestbook/environments/prod/globals.libsonnet delete mode 100644 ksonnet-guestbook/environments/prod/main.jsonnet delete mode 100644 ksonnet-guestbook/environments/prod/params.libsonnet delete mode 100644 kustomize-guestbook/guestbook-ui-deployment.yaml delete mode 100644 kustomize-guestbook/guestbook-ui-svc.yaml delete mode 100644 kustomize-guestbook/kustomization.yaml diff --git a/application-crds/base/crd.yaml b/application-crds/base/crd.yaml new file mode 100644 index 0000000..133342c --- /dev/null +++ b/application-crds/base/crd.yaml @@ -0,0 +1,239 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: applications.app.k8s.io +spec: + group: app.k8s.io + names: + kind: Application + plural: applications + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + addOwnerRef: + type: boolean + assemblyPhase: + type: string + componentKinds: + items: + type: object + type: array + descriptor: + properties: + description: + type: string + icons: + items: + properties: + size: + type: string + src: + type: string + type: + type: string + required: + - src + type: object + type: array + keywords: + items: + type: string + type: array + links: + items: + properties: + description: + type: string + url: + type: string + type: object + type: array + maintainers: + items: + properties: + email: + type: string + name: + type: string + url: + type: string + type: object + type: array + notes: + type: string + owners: + items: + properties: + email: + type: string + name: + type: string + url: + type: string + type: object + type: array + type: + type: string + version: + type: string + type: object + info: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + key: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + resourceVersion: + type: string + uid: + type: string + type: object + ingressRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + host: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + path: + type: string + resourceVersion: + type: string + uid: + type: string + type: object + secretKeyRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + key: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + resourceVersion: + type: string + uid: + type: string + type: object + serviceRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + path: + type: string + port: + format: int32 + type: integer + resourceVersion: + type: string + uid: + type: string + type: object + type: + type: string + type: object + type: object + type: array + selector: + type: object + type: object + status: + properties: + components: + items: + properties: + group: + type: string + kind: + type: string + link: + type: string + name: + type: string + status: + type: string + type: object + type: array + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - type + - status + type: object + type: array + observedGeneration: + format: int64 + type: integer + type: object + version: v1beta1 +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/application-crds/base/kustomization.yaml b/application-crds/base/kustomization.yaml new file mode 100644 index 0000000..6e120e7 --- /dev/null +++ b/application-crds/base/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- crd.yaml diff --git a/application-crds/kustomization.yaml b/application-crds/kustomization.yaml new file mode 100644 index 0000000..4e745bd --- /dev/null +++ b/application-crds/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- base +kind: Kustomization +namespace: kubeflow diff --git a/application/base/cluster-role-binding.yaml b/application/base/cluster-role-binding.yaml new file mode 100644 index 0000000..f7fe51d --- /dev/null +++ b/application/base/cluster-role-binding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cluster-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-role +subjects: +- kind: ServiceAccount + name: service-account diff --git a/application/base/cluster-role.yaml b/application/base/cluster-role.yaml new file mode 100644 index 0000000..169fc3b --- /dev/null +++ b/application/base/cluster-role.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cluster-role +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - get + - list + - update + - patch + - watch +- apiGroups: + - app.k8s.io + resources: + - '*' + verbs: + - '*' diff --git a/application/base/kustomization.yaml b/application/base/kustomization.yaml new file mode 100644 index 0000000..dcc6709 --- /dev/null +++ b/application/base/kustomization.yaml @@ -0,0 +1,29 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- cluster-role.yaml +- cluster-role-binding.yaml +- service-account.yaml +- service.yaml +- stateful-set.yaml +namespace: kubeflow +nameprefix: application-controller- +configMapGenerator: +- name: parameters + env: params.env +generatorOptions: + disableNameSuffixHash: true +images: +- name: gcr.io/kubeflow-images-public/kubernetes-sigs/application + newName: gcr.io/kubeflow-images-public/kubernetes-sigs/application + newTag: 1.0-beta +vars: +- name: project + objref: + kind: ConfigMap + name: parameters + apiVersion: v1 + fieldref: + fieldpath: data.project +configurations: +- params.yaml diff --git a/application/base/params.env b/application/base/params.env new file mode 100644 index 0000000..8a76300 --- /dev/null +++ b/application/base/params.env @@ -0,0 +1 @@ +project= diff --git a/application/base/params.yaml b/application/base/params.yaml new file mode 100644 index 0000000..e544ce9 --- /dev/null +++ b/application/base/params.yaml @@ -0,0 +1,3 @@ +varReference: +- path: spec/template/spec/containers/image + kind: StatefulSet diff --git a/application/base/service-account.yaml b/application/base/service-account.yaml new file mode 100644 index 0000000..a36cbd8 --- /dev/null +++ b/application/base/service-account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: service-account diff --git a/application/base/service.yaml b/application/base/service.yaml new file mode 100644 index 0000000..c7368f9 --- /dev/null +++ b/application/base/service.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Service +metadata: + name: service +spec: + ports: + - port: 443 diff --git a/application/base/stateful-set.yaml b/application/base/stateful-set.yaml new file mode 100644 index 0000000..6c1d74c --- /dev/null +++ b/application/base/stateful-set.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-set +spec: + serviceName: service + selector: + matchLabels: + app: application-controller + template: + metadata: + labels: + app: application-controller + annotations: + sidecar.istio.io/inject: "false" + spec: + containers: + - name: manager + command: + - /root/manager + image: gcr.io/kubeflow-images-public/kubernetes-sigs/application + imagePullPolicy: Always + env: + - name: project + value: $(project) + serviceAccountName: service-account + volumeClaimTemplates: [] diff --git a/application/kustomization.yaml b/application/kustomization.yaml new file mode 100644 index 0000000..6bb5836 --- /dev/null +++ b/application/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- base +commonLabels: + app.kubernetes.io/component: kubeflow + app.kubernetes.io/instance: kubeflow-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/name: kubeflow + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 +kind: Kustomization +namespace: kubeflow +resources: +- overlays/application/application.yaml +namePrefix: application1 diff --git a/application/overlays/application/application.yaml b/application/overlays/application/application.yaml new file mode 100644 index 0000000..8824962 --- /dev/null +++ b/application/overlays/application/application.yaml @@ -0,0 +1,34 @@ +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + name: kubeflow +spec: + selector: + matchLabels: + app.kubernetes.io/name: kubeflow + app.kubernetes.io/instance: kubeflow-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/component: kubeflow + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 + componentKinds: + - group: app.k8s.io + kind: Application + descriptor: + type: kubeflow + version: v1beta1 + description: application that aggregates all kubeflow applications + maintainers: + - name: Jeremy Lewi + email: jlewi@google.com + - name: Kam Kasravi + email: kam.d.kasravi@intel.com + owners: + - name: Jeremy Lewi + email: jlewi@google.com + keywords: + - kubeflow + links: + - description: About + url: "https://kubeflow.org" + addOwnerRef: true diff --git a/application/overlays/application/kustomization.yaml b/application/overlays/application/kustomization.yaml new file mode 100644 index 0000000..efd2eec --- /dev/null +++ b/application/overlays/application/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +resources: +- application.yaml +commonLabels: + app.kubernetes.io/name: kubeflow + app.kubernetes.io/instance: kubeflow-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/component: kubeflow + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 diff --git a/application/overlays/debug/kustomization.yaml b/application/overlays/debug/kustomization.yaml new file mode 100644 index 0000000..93fb76b --- /dev/null +++ b/application/overlays/debug/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +patchesStrategicMerge: +- stateful-set.yaml +images: +- name: gcr.io/$(project)/application-controller + newName: gcr.io/$(project)/application-controller + newTag: latest diff --git a/application/overlays/debug/stateful-set.yaml b/application/overlays/debug/stateful-set.yaml new file mode 100644 index 0000000..9408dee --- /dev/null +++ b/application/overlays/debug/stateful-set.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-set +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + spec: + containers: + - name: manager + image: gcr.io/$(project)/application-controller:latest + command: + - /go/bin/dlv + args: + - --listen=:2345 + - --headless=true + - --api-version=2 + - exec + - /go/src/github.com/kubernetes-sigs/application/manager + ports: + - containerPort: 2345 + securityContext: + privileged: true diff --git a/apps/templates/application-crds.yaml b/apps/templates/application-crds.yaml new file mode 100644 index 0000000..2f2a70b --- /dev/null +++ b/apps/templates/application-crds.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: application-crds + namespace: kubeflow + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kubeflow + server: {{ .Values.spec.destination.server }} + project: default + source: + path: application-crds + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: {{ .Values.spec.source.targetRevision }} + + + diff --git a/apps/templates/application.yaml b/apps/templates/application.yaml new file mode 100644 index 0000000..920f24e --- /dev/null +++ b/apps/templates/application.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: application + namespace: kubeflow + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kubeflow + server: {{ .Values.spec.destination.server }} + project: default + source: + path: application + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: {{ .Values.spec.source.targetRevision }} diff --git a/apps/templates/jupyter-web-app.yaml b/apps/templates/jupyter-web-app.yaml new file mode 100644 index 0000000..66e32fc --- /dev/null +++ b/apps/templates/jupyter-web-app.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: jupyter-web-app + namespace: kubeflow + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kubeflow + server: {{ .Values.spec.destination.server }} + project: default + source: + path: jupyter-web-app + repoURL: {{ .Values.spec.source.repoURL }} + targetRevision: {{ .Values.spec.source.targetRevision }} diff --git a/apps/templates/namespaces.yaml b/apps/templates/namespaces.yaml index 18f8ed7..60c8ac7 100644 --- a/apps/templates/namespaces.yaml +++ b/apps/templates/namespaces.yaml @@ -11,3 +11,10 @@ metadata: name: sync-waves annotations: argocd.argoproj.io/sync-wave: "-1" +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kubeflow + annotations: + argocd.argoproj.io/sync-wave: "-1" diff --git a/blue-green/.helmignore b/blue-green/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/blue-green/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/blue-green/Chart.yaml b/blue-green/Chart.yaml deleted file mode 100644 index 0e6f934..0000000 --- a/blue-green/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: helm-guestbook -version: 0.1.0 diff --git a/blue-green/README.md b/blue-green/README.md deleted file mode 100644 index b1ad020..0000000 --- a/blue-green/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Blue Green - -The blue green strategy is not supported by built-in Kubernetes Deployment but available via third-party Kubernetes controller. -This example demonstrates how to implement blue-green deployment via [Argo Rollouts](https://github.com/argoproj/argo-rollouts): - -1. Install Argo Rollouts controller: https://github.com/argoproj/argo-rollouts#installation -2. Create a sample application and sync it. - -``` -argocd app create --name blue-green --repo https://github.com/argoproj/argocd-example-apps --dest-server https://kubernetes.default.svc --dest-namespace default --path blue-green && argocd app sync blue-green -``` - -Once the application is synced you can access it using `blue-green-helm-guestbook` service. - -3. Change image version parameter to trigger blue-green deployment process: - -``` -argocd app set blue-green -p image.tag=0.2 && argocd app sync blue-green -``` - -Now application runs `ks-guestbook-demo:0.1` and `ks-guestbook-demo:0.2` images simultaneously. -The `ks-guestbook-demo:0.2` is still considered `blue` available only via preview service `blue-green-helm-guestbook-preview`. - -4. Promote `ks-guestbook-demo:0.2` to `green` by patching `Rollout` resource: - -``` -argocd app patch-resource blue-green --kind Rollout --resource-name blue-green-helm-guestbook --patch '{ "status": { "verifyingPreview": false } }' --patch-type 'application/merge-patch+json' -``` - -This promotes `ks-guestbook-demo:0.2` to `green` status and `Rollout` deletes old replica which runs `ks-guestbook-demo:0.1`. diff --git a/blue-green/templates/NOTES.txt b/blue-green/templates/NOTES.txt deleted file mode 100644 index 37a1485..0000000 --- a/blue-green/templates/NOTES.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "helm-guestbook.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ template "helm-guestbook.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "helm-guestbook.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "helm-guestbook.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/blue-green/templates/_helpers.tpl b/blue-green/templates/_helpers.tpl deleted file mode 100644 index 20f5d8e..0000000 --- a/blue-green/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "helm-guestbook.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "helm-guestbook.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "helm-guestbook.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/blue-green/templates/rollout.yaml b/blue-green/templates/rollout.yaml deleted file mode 100644 index aa0b534..0000000 --- a/blue-green/templates/rollout.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Rollout -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - revisionHistoryLimit: 3 - selector: - matchLabels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - strategy: - blueGreen: - activeService: {{ template "helm-guestbook.fullname" . }} - previewService: {{ template "helm-guestbook.fullname" . }}-preview - template: - metadata: - labels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - spec: - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} diff --git a/blue-green/templates/services.yaml b/blue-green/templates/services.yaml deleted file mode 100644 index 0f4d0e0..0000000 --- a/blue-green/templates/services.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "helm-guestbook.fullname" . }}-preview - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} diff --git a/blue-green/values.yaml b/blue-green/values.yaml deleted file mode 100644 index 3666712..0000000 --- a/blue-green/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Default values for helm-guestbook. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: gcr.io/heptio-images/ks-guestbook-demo - tag: 0.1 - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/guestbook/guestbook-ui-deployment.yaml b/guestbook/guestbook-ui-deployment.yaml deleted file mode 100644 index 8a0975e..0000000 --- a/guestbook/guestbook-ui-deployment.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: guestbook-ui -spec: - replicas: 1 - revisionHistoryLimit: 3 - selector: - matchLabels: - app: guestbook-ui - template: - metadata: - labels: - app: guestbook-ui - spec: - containers: - - image: gcr.io/heptio-images/ks-guestbook-demo:0.2 - name: guestbook-ui - ports: - - containerPort: 80 diff --git a/guestbook/guestbook-ui-svc.yaml b/guestbook/guestbook-ui-svc.yaml deleted file mode 100644 index e8a4a27..0000000 --- a/guestbook/guestbook-ui-svc.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: guestbook-ui -spec: - ports: - - port: 80 - targetPort: 80 - selector: - app: guestbook-ui diff --git a/helm-dependency/Chart.yaml b/helm-dependency/Chart.yaml deleted file mode 100644 index 59ca9a9..0000000 --- a/helm-dependency/Chart.yaml +++ /dev/null @@ -1 +0,0 @@ -name: wordpress \ No newline at end of file diff --git a/helm-dependency/README.md b/helm-dependency/README.md deleted file mode 100644 index 0e24c56..0000000 --- a/helm-dependency/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Helm Dependencies - -This example application demonstrates how an OTS (off-the-shelf) helm chart can be retrieved and -pinned to a specific helm sem version from an upstream helm repository, and customized using a custom -values.yaml in the private git repository. - -In this example, the wordpress application is pulled from the stable helm repo, and pinned to v5.0.2: - -```yaml -dependencies: -- name: wordpress - version: 5.0.2 - repository: https://kubernetes-charts.storage.googleapis.com -``` - -A custom values.yaml is used to customize the parameters of the wordpress helm chart: - -```yaml -wordpress: - wordpressPassword: foo - mariadb: - db: - password: bar - rootUser: - password: baz -``` - -### Subchart Note - -The wordpress chart referenced in this example contains a subchart for mariadb as specified in the requirements.yaml file of the wordpress chart: -```yaml -- name: mariadb - version: 5.x.x - repository: https://kubernetes-charts.storage.googleapis.com/ - condition: mariadb.enabled - tags: - - wordpress-database -``` - -In order to disable this chart, you must set the value to false for both `mariadb.enabled` and `wordpress.mariadb.enabled`. The first is used by the mariadb subchart condition field, the second is used by the wordpress chart deployment template. An example demonstration is available in the values-nomaria.yaml file: -```yaml -mariadb: - enabled: false - -wordpress: - wordpressPassword: foo - mariadb: - enabled: false - externalDatabase: - host: localhost - user: bn_wordpress - password: "" - database: bitnami_wordpress - port: 3306 -``` \ No newline at end of file diff --git a/helm-dependency/requirements.yaml b/helm-dependency/requirements.yaml deleted file mode 100644 index 258e5d3..0000000 --- a/helm-dependency/requirements.yaml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: -- name: wordpress - version: 5.0.2 - repository: https://kubernetes-charts.storage.googleapis.com diff --git a/helm-dependency/values-nomaria.yaml b/helm-dependency/values-nomaria.yaml deleted file mode 100644 index 98f17bc..0000000 --- a/helm-dependency/values-nomaria.yaml +++ /dev/null @@ -1,13 +0,0 @@ -mariadb: - enabled: false - -wordpress: - wordpressPassword: foo - mariadb: - enabled: false - externalDatabase: - host: localhost - user: bn_wordpress - password: "" - database: bitnami_wordpress - port: 3306 \ No newline at end of file diff --git a/helm-dependency/values.yaml b/helm-dependency/values.yaml deleted file mode 100644 index a954a18..0000000 --- a/helm-dependency/values.yaml +++ /dev/null @@ -1,7 +0,0 @@ -wordpress: - wordpressPassword: foo - mariadb: - db: - password: bar - rootUser: - password: baz diff --git a/helm-guestbook/.helmignore b/helm-guestbook/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/helm-guestbook/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/helm-guestbook/Chart.yaml b/helm-guestbook/Chart.yaml deleted file mode 100644 index 0e6f934..0000000 --- a/helm-guestbook/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: helm-guestbook -version: 0.1.0 diff --git a/helm-guestbook/templates/NOTES.txt b/helm-guestbook/templates/NOTES.txt deleted file mode 100644 index 37a1485..0000000 --- a/helm-guestbook/templates/NOTES.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "helm-guestbook.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ template "helm-guestbook.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "helm-guestbook.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "helm-guestbook.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/helm-guestbook/templates/_helpers.tpl b/helm-guestbook/templates/_helpers.tpl deleted file mode 100644 index 20f5d8e..0000000 --- a/helm-guestbook/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "helm-guestbook.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "helm-guestbook.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "helm-guestbook.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/helm-guestbook/templates/deployment.yaml b/helm-guestbook/templates/deployment.yaml deleted file mode 100644 index 980df25..0000000 --- a/helm-guestbook/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - revisionHistoryLimit: 3 - selector: - matchLabels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - spec: - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} diff --git a/helm-guestbook/templates/service.yaml b/helm-guestbook/templates/service.yaml deleted file mode 100644 index b7aab0b..0000000 --- a/helm-guestbook/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} diff --git a/helm-guestbook/values-production.yaml b/helm-guestbook/values-production.yaml deleted file mode 100644 index 42838b7..0000000 --- a/helm-guestbook/values-production.yaml +++ /dev/null @@ -1,2 +0,0 @@ -service: - type: LoadBalancer diff --git a/helm-guestbook/values.yaml b/helm-guestbook/values.yaml deleted file mode 100644 index 3666712..0000000 --- a/helm-guestbook/values.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Default values for helm-guestbook. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: gcr.io/heptio-images/ks-guestbook-demo - tag: 0.1 - pullPolicy: IfNotPresent - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/jsonnet-guestbook-tla/guestbook-ui.jsonnet b/jsonnet-guestbook-tla/guestbook-ui.jsonnet deleted file mode 100644 index 7ecdfb2..0000000 --- a/jsonnet-guestbook-tla/guestbook-ui.jsonnet +++ /dev/null @@ -1,65 +0,0 @@ -function ( - containerPort=80, - image="gcr.io/heptio-images/ks-guestbook-demo:0.2", - name="jsonnet-guestbook-ui", - replicas=1, - servicePort=80, - type="LoadBalancer" -) - [ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": name - }, - "spec": { - "ports": [ - { - "port": servicePort, - "targetPort": containerPort - } - ], - "selector": { - "app": name - }, - "type": type - } - }, - { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": name - }, - "spec": { - "replicas": replicas, - "revisionHistoryLimit": 3, - "selector": { - "matchLabels": { - "app": name - }, - }, - "template": { - "metadata": { - "labels": { - "app": name - } - }, - "spec": { - "containers": [ - { - "image": image, - "name": name, - "ports": [ - { - "containerPort": containerPort - } - ] - } - ] - } - } - } - } - ] diff --git a/jsonnet-guestbook/guestbook-ui.jsonnet b/jsonnet-guestbook/guestbook-ui.jsonnet deleted file mode 100644 index a4b1aa7..0000000 --- a/jsonnet-guestbook/guestbook-ui.jsonnet +++ /dev/null @@ -1,59 +0,0 @@ -local params = import 'params.libsonnet'; - -[ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": params.name - }, - "spec": { - "ports": [ - { - "port": params.servicePort, - "targetPort": params.containerPort - } - ], - "selector": { - "app": params.name - }, - "type": params.type - } - }, - { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": params.name - }, - "spec": { - "replicas": params.replicas, - "revisionHistoryLimit": 3, - "selector": { - "matchLabels": { - "app": params.name - }, - }, - "template": { - "metadata": { - "labels": { - "app": params.name - } - }, - "spec": { - "containers": [ - { - "image": params.image, - "name": params.name, - "ports": [ - { - "containerPort": params.containerPort - } - ] - } - ] - } - } - } - } -] diff --git a/jsonnet-guestbook/params.libsonnet b/jsonnet-guestbook/params.libsonnet deleted file mode 100644 index 3120aad..0000000 --- a/jsonnet-guestbook/params.libsonnet +++ /dev/null @@ -1,8 +0,0 @@ -{ - containerPort: 80, - image: "gcr.io/heptio-images/ks-guestbook-demo:0.2", - name: "jsonnet-guestbook-ui", - replicas: 1, - servicePort: 80, - type: "LoadBalancer", -} diff --git a/jupyter-web-app/base/cluster-role-binding.yaml b/jupyter-web-app/base/cluster-role-binding.yaml new file mode 100644 index 0000000..f7fe51d --- /dev/null +++ b/jupyter-web-app/base/cluster-role-binding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cluster-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-role +subjects: +- kind: ServiceAccount + name: service-account diff --git a/jupyter-web-app/base/cluster-role.yaml b/jupyter-web-app/base/cluster-role.yaml new file mode 100644 index 0000000..578f436 --- /dev/null +++ b/jupyter-web-app/base/cluster-role.yaml @@ -0,0 +1,54 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cluster-role +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - create + - delete +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +- apiGroups: + - kubeflow.org + resources: + - notebooks + - notebooks/finalizers + - poddefaults + verbs: + - get + - list + - create + - delete +- apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - create + - delete + - get + - list +- apiGroups: + - "" + resources: + - events + verbs: + - list +- apiGroups: + - storage.k8s.io + resources: + - storageclasses + verbs: + - get + - list + - watch diff --git a/jupyter-web-app/base/config-map.yaml b/jupyter-web-app/base/config-map.yaml new file mode 100644 index 0000000..b24ca7a --- /dev/null +++ b/jupyter-web-app/base/config-map.yaml @@ -0,0 +1,127 @@ +apiVersion: v1 +data: + spawner_ui_config.yaml: | + # Configuration file for the Jupyter UI. + # + # Each Jupyter UI option is configured by two keys: 'value' and 'readOnly' + # - The 'value' key contains the default value + # - The 'readOnly' key determines if the option will be available to users + # + # If the 'readOnly' key is present and set to 'true', the respective option + # will be disabled for users and only set by the admin. Also when a + # Notebook is POSTED to the API if a necessary field is not present then + # the value from the config will be used. + # + # If the 'readOnly' key is missing (defaults to 'false'), the respective option + # will be available for users to edit. + # + # Note that some values can be templated. Such values are the names of the + # Volumes as well as their StorageClass + spawnerFormDefaults: + image: + # The container Image for the user's Jupyter Notebook + # If readonly, this value must be a member of the list below + value: gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v-base-ef41372-1177829795472347138 + # The list of available standard container Images + options: + - gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0 + - gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-gpu:v0.7.0 + - gcr.io/kubeflow-images-public/tensorflow-2.0.0a0-notebook-cpu:v0.7.0 + - gcr.io/kubeflow-images-public/tensorflow-2.0.0a0-notebook-gpu:v0.7.0 + # By default, custom container Images are allowed + # Uncomment the following line to only enable standard container Images + readOnly: false + cpu: + # CPU for user's Notebook + value: '0.5' + readOnly: false + memory: + # Memory for user's Notebook + value: 1.0Gi + readOnly: false + workspaceVolume: + # Workspace Volume to be attached to user's Notebook + # Each Workspace Volume is declared with the following attributes: + # Type, Name, Size, MountPath and Access Mode + value: + type: + # The Type of the Workspace Volume + # Supported values: 'New', 'Existing' + value: New + name: + # The Name of the Workspace Volume + # Note that this is a templated value. Special values: + # {notebook-name}: Replaced with the name of the Notebook. The frontend + # will replace this value as the user types the name + value: 'workspace-{notebook-name}' + size: + # The Size of the Workspace Volume (in Gi) + value: '10Gi' + mountPath: + # The Path that the Workspace Volume will be mounted + value: /home/jovyan + accessModes: + # The Access Mode of the Workspace Volume + # Supported values: 'ReadWriteOnce', 'ReadWriteMany', 'ReadOnlyMany' + value: ReadWriteOnce + class: + # The StrageClass the PVC will use if type is New. Special values are: + # {none}: default StorageClass + # {empty}: empty string "" + value: '{none}' + readOnly: false + dataVolumes: + # List of additional Data Volumes to be attached to the user's Notebook + value: [] + # Each Data Volume is declared with the following attributes: + # Type, Name, Size, MountPath and Access Mode + # + # For example, a list with 2 Data Volumes: + # value: + # - value: + # type: + # value: New + # name: + # value: '{notebook-name}-vol-1' + # size: + # value: '10Gi' + # class: + # value: standard + # mountPath: + # value: /home/jovyan/vol-1 + # accessModes: + # value: ReadWriteOnce + # class: + # value: {none} + # - value: + # type: + # value: New + # name: + # value: '{notebook-name}-vol-2' + # size: + # value: '10Gi' + # mountPath: + # value: /home/jovyan/vol-2 + # accessModes: + # value: ReadWriteMany + # class: + # value: {none} + readOnly: false + extraResources: + # Extra Resource Limits for user's Notebook + # e.x. "{'nvidia.com/gpu': 2}" + value: "{}" + readOnly: false + shm: + value: true + readOnly: false + configurations: + # List of labels to be selected, these are the labels from PodDefaults + # value: + # - add-gcp-secret + # - default-editor + value: [] + readOnly: false +kind: ConfigMap +metadata: + name: config diff --git a/jupyter-web-app/base/deployment.yaml b/jupyter-web-app/base/deployment.yaml new file mode 100644 index 0000000..6eb2cc4 --- /dev/null +++ b/jupyter-web-app/base/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: deployment +spec: + replicas: 1 + template: + spec: + containers: + - env: + - name: ROK_SECRET_NAME + valueFrom: + configMapKeyRef: + name: parameters + key: ROK_SECRET_NAME + - name: UI + valueFrom: + configMapKeyRef: + name: parameters + key: UI + - name: USERID_HEADER + value: $(userid-header) + - name: USERID_PREFIX + value: $(userid-prefix) + image: gcr.io/kubeflow-images-public/jupyter-web-app:v0.5.0 + imagePullPolicy: $(policy) + name: jupyter-web-app + ports: + - containerPort: 5000 + volumeMounts: + - mountPath: /etc/config + name: config-volume + serviceAccountName: service-account + volumes: + - configMap: + name: config + name: config-volume diff --git a/jupyter-web-app/base/kustomization.yaml b/jupyter-web-app/base/kustomization.yaml new file mode 100644 index 0000000..2cfe2f5 --- /dev/null +++ b/jupyter-web-app/base/kustomization.yaml @@ -0,0 +1,70 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- cluster-role-binding.yaml +- cluster-role.yaml +- config-map.yaml +- deployment.yaml +- role-binding.yaml +- role.yaml +- service-account.yaml +- service.yaml +namePrefix: jupyter-web-app- +namespace: kubeflow +commonLabels: + app: jupyter-web-app + kustomize.component: jupyter-web-app +images: +- name: gcr.io/kubeflow-images-public/jupyter-web-app + newName: gcr.io/kubeflow-images-public/jupyter-web-app + newTag: vmaster-ge8c85064 +configMapGenerator: +- env: params.env + name: parameters +generatorOptions: + disableNameSuffixHash: true +vars: +- fieldref: + fieldPath: data.policy + name: policy + objref: + apiVersion: v1 + kind: ConfigMap + name: parameters +- fieldref: + fieldPath: data.prefix + name: prefix + objref: + apiVersion: v1 + kind: ConfigMap + name: parameters +- fieldref: + fieldPath: data.clusterDomain + name: clusterDomain + objref: + apiVersion: v1 + kind: ConfigMap + name: parameters +- fieldref: + fieldPath: metadata.namespace + name: namespace + objref: + apiVersion: v1 + kind: Service + name: service +- fieldref: + fieldPath: data.userid-header + name: userid-header + objref: + apiVersion: v1 + kind: ConfigMap + name: parameters +- fieldref: + fieldPath: data.userid-prefix + name: userid-prefix + objref: + apiVersion: v1 + kind: ConfigMap + name: parameters +configurations: +- params.yaml diff --git a/jupyter-web-app/base/params.env b/jupyter-web-app/base/params.env new file mode 100644 index 0000000..c6a1a52 --- /dev/null +++ b/jupyter-web-app/base/params.env @@ -0,0 +1,7 @@ +UI=default +ROK_SECRET_NAME=secret-rok-{username} +policy=Always +prefix=jupyter +clusterDomain=cluster.local +userid-header=kubeflow-userid +userid-prefix= diff --git a/jupyter-web-app/base/params.yaml b/jupyter-web-app/base/params.yaml new file mode 100644 index 0000000..65ff484 --- /dev/null +++ b/jupyter-web-app/base/params.yaml @@ -0,0 +1,9 @@ +varReference: +- path: spec/template/spec/containers/imagePullPolicy + kind: Deployment +- path: metadata/annotations/getambassador.io\/config + kind: Service +- path: spec/template/spec/containers/0/env/2/value + kind: Deployment +- path: spec/template/spec/containers/0/env/3/value + kind: Deployment \ No newline at end of file diff --git a/jupyter-web-app/base/role-binding.yaml b/jupyter-web-app/base/role-binding.yaml new file mode 100644 index 0000000..5400a70 --- /dev/null +++ b/jupyter-web-app/base/role-binding.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: jupyter-notebook-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: jupyter-notebook-role +subjects: +- kind: ServiceAccount + name: jupyter-notebook diff --git a/jupyter-web-app/base/role.yaml b/jupyter-web-app/base/role.yaml new file mode 100644 index 0000000..bcd601a --- /dev/null +++ b/jupyter-web-app/base/role.yaml @@ -0,0 +1,35 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: jupyter-notebook-role +rules: +- apiGroups: + - "" + resources: + - pods + - pods/log + - secrets + - services + verbs: + - '*' +- apiGroups: + - "" + - apps + - extensions + resources: + - deployments + - replicasets + verbs: + - '*' +- apiGroups: + - kubeflow.org + resources: + - '*' + verbs: + - '*' +- apiGroups: + - batch + resources: + - jobs + verbs: + - '*' diff --git a/jupyter-web-app/base/service-account.yaml b/jupyter-web-app/base/service-account.yaml new file mode 100644 index 0000000..a36cbd8 --- /dev/null +++ b/jupyter-web-app/base/service-account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: service-account diff --git a/jupyter-web-app/base/service.yaml b/jupyter-web-app/base/service.yaml new file mode 100644 index 0000000..d22b9ed --- /dev/null +++ b/jupyter-web-app/base/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + getambassador.io/config: |- + --- + apiVersion: ambassador/v0 + kind: Mapping + name: webapp_mapping + prefix: /$(prefix)/ + service: jupyter-web-app-service.$(namespace) + add_request_headers: + x-forwarded-prefix: /jupyter + labels: + run: jupyter-web-app + name: service +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 5000 + type: ClusterIP diff --git a/jupyter-web-app/kustomization.yaml b/jupyter-web-app/kustomization.yaml new file mode 100644 index 0000000..3bd60b4 --- /dev/null +++ b/jupyter-web-app/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- base +- overlays/istio +commonLabels: + app.kubernetes.io/component: jupyter-web-app + app.kubernetes.io/instance: jupyter-web-app-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/name: jupyter-web-app + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 +kind: Kustomization +namespace: kubeflow +resources: +- overlays/application/application.yaml diff --git a/jupyter-web-app/overlays/application/application.yaml b/jupyter-web-app/overlays/application/application.yaml new file mode 100644 index 0000000..403e269 --- /dev/null +++ b/jupyter-web-app/overlays/application/application.yaml @@ -0,0 +1,49 @@ +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + name: jupyter-web-app +spec: + selector: + matchLabels: + app.kubernetes.io/name: jupyter-web-app + app.kubernetes.io/instance: jupyter-web-app-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/component: jupyter-web-app + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 + componentKinds: + - group: core + kind: ConfigMap + - group: apps + kind: Deployment + - group: rbac.authorization.k8s.io + kind: RoleBinding + - group: rbac.authorization.k8s.io + kind: Role + - group: core + kind: ServiceAccount + - group: core + kind: Service + - group: networking.istio.io + kind: VirtualService + descriptor: + type: jupyter-web-app + version: v1beta1 + description: Provides a UI which allows the user to create/conect/delete jupyter notebooks. + maintainers: + - name: Kimonas Sotirchos + email: kimwnasptd@arrikto.com + owners: + - name: Kimonas Sotirchos + email: kimwnasptd@arrikto.com + keywords: + - jupyterhub + - jupyter ui + - notebooks + links: + - description: About + url: https://github.com/kubeflow/kubeflow/tree/master/components/jupyter-web-app + - description: Docs + url: https://www.kubeflow.org/docs/notebooks + addOwnerRef: true + diff --git a/jupyter-web-app/overlays/application/kustomization.yaml b/jupyter-web-app/overlays/application/kustomization.yaml new file mode 100644 index 0000000..0c1f073 --- /dev/null +++ b/jupyter-web-app/overlays/application/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +resources: +- application.yaml +commonLabels: + app.kubernetes.io/name: jupyter-web-app + app.kubernetes.io/instance: jupyter-web-app-v0.7.0 + app.kubernetes.io/managed-by: kfctl + app.kubernetes.io/component: jupyter-web-app + app.kubernetes.io/part-of: kubeflow + app.kubernetes.io/version: v0.7.0 diff --git a/jupyter-web-app/overlays/istio/kustomization.yaml b/jupyter-web-app/overlays/istio/kustomization.yaml new file mode 100644 index 0000000..0991e8f --- /dev/null +++ b/jupyter-web-app/overlays/istio/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- virtual-service.yaml +configurations: +- params.yaml diff --git a/jupyter-web-app/overlays/istio/params.yaml b/jupyter-web-app/overlays/istio/params.yaml new file mode 100644 index 0000000..eea869e --- /dev/null +++ b/jupyter-web-app/overlays/istio/params.yaml @@ -0,0 +1,3 @@ +varReference: +- path: spec/http/route/destination/host + kind: VirtualService diff --git a/jupyter-web-app/overlays/istio/virtual-service.yaml b/jupyter-web-app/overlays/istio/virtual-service.yaml new file mode 100644 index 0000000..589a8ee --- /dev/null +++ b/jupyter-web-app/overlays/istio/virtual-service.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: jupyter-web-app +spec: + gateways: + - kubeflow-gateway + hosts: + - '*' + http: + - headers: + request: + add: + x-forwarded-prefix: /jupyter + match: + - uri: + prefix: /jupyter/ + rewrite: + uri: / + route: + - destination: + host: jupyter-web-app-service.$(namespace).svc.$(clusterDomain) + port: + number: 80 diff --git a/ksonnet-guestbook/.gitignore b/ksonnet-guestbook/.gitignore deleted file mode 100644 index f8714d3..0000000 --- a/ksonnet-guestbook/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/lib -/.ksonnet/registries -/app.override.yaml -/.ks_environment diff --git a/ksonnet-guestbook/app.yaml b/ksonnet-guestbook/app.yaml deleted file mode 100644 index 6fc0b6a..0000000 --- a/ksonnet-guestbook/app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: 0.1.0 -environments: - default: - destination: - namespace: default - server: https://kubernetes.default.svc - k8sVersion: v1.10.0 - path: default - dev: - destination: - namespace: dev - server: https://kubernetes.default.svc - k8sVersion: v1.10.0 - path: dev - prod: - destination: - namespace: prod - server: https://kubernetes.default.svc - k8sVersion: v1.10.0 - path: prod -kind: ksonnet.io/app -name: guestbook -version: 0.0.1 diff --git a/ksonnet-guestbook/components/guestbook-ui.jsonnet b/ksonnet-guestbook/components/guestbook-ui.jsonnet deleted file mode 100644 index b615bdb..0000000 --- a/ksonnet-guestbook/components/guestbook-ui.jsonnet +++ /dev/null @@ -1,59 +0,0 @@ -local env = std.extVar("__ksonnet/environments"); -local params = std.extVar("__ksonnet/params").components["guestbook-ui"]; -[ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": params.name - }, - "spec": { - "ports": [ - { - "port": params.servicePort, - "targetPort": params.containerPort - } - ], - "selector": { - "app": params.name - }, - "type": params.type - } - }, - { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "name": params.name - }, - "spec": { - "replicas": params.replicas, - "revisionHistoryLimit": 3, - "selector": { - "matchLabels": { - "app": params.name - }, - }, - "template": { - "metadata": { - "labels": { - "app": params.name - } - }, - "spec": { - "containers": [ - { - "image": params.image, - "name": params.name, - "ports": [ - { - "containerPort": params.containerPort - } - ] - } - ] - } - } - } - } -] diff --git a/ksonnet-guestbook/components/params.libsonnet b/ksonnet-guestbook/components/params.libsonnet deleted file mode 100644 index 162ad1f..0000000 --- a/ksonnet-guestbook/components/params.libsonnet +++ /dev/null @@ -1,18 +0,0 @@ -{ - global: { - // User-defined global parameters; accessible to all component and environments, Ex: - // replicas: 4, - }, - components: { - // Component-level parameters, defined initially from 'ks prototype use ...' - // Each object below should correspond to a component in the components/ directory - "guestbook-ui": { - containerPort: 80, - image: "gcr.io/heptio-images/ks-guestbook-demo:0.2", - name: "ks-guestbook-ui", - replicas: 1, - servicePort: 80, - type: "LoadBalancer", - }, - }, -} diff --git a/ksonnet-guestbook/environments/base.libsonnet b/ksonnet-guestbook/environments/base.libsonnet deleted file mode 100644 index a129aff..0000000 --- a/ksonnet-guestbook/environments/base.libsonnet +++ /dev/null @@ -1,4 +0,0 @@ -local components = std.extVar("__ksonnet/components"); -components + { - // Insert user-specified overrides here. -} diff --git a/ksonnet-guestbook/environments/default/globals.libsonnet b/ksonnet-guestbook/environments/default/globals.libsonnet deleted file mode 100644 index 7a73a41..0000000 --- a/ksonnet-guestbook/environments/default/globals.libsonnet +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/ksonnet-guestbook/environments/default/main.jsonnet b/ksonnet-guestbook/environments/default/main.jsonnet deleted file mode 100644 index 58695a8..0000000 --- a/ksonnet-guestbook/environments/default/main.jsonnet +++ /dev/null @@ -1,8 +0,0 @@ -local base = import "base.libsonnet"; -// uncomment if you reference ksonnet-lib -// local k = import "k.libsonnet"; - -base + { - // Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n") - // "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"}) -} diff --git a/ksonnet-guestbook/environments/default/params.libsonnet b/ksonnet-guestbook/environments/default/params.libsonnet deleted file mode 100644 index b6eb32d..0000000 --- a/ksonnet-guestbook/environments/default/params.libsonnet +++ /dev/null @@ -1,17 +0,0 @@ -local params = std.extVar("__ksonnet/params"); -local globals = import "globals.libsonnet"; -local envParams = params + { - components +: { - // Insert component parameter overrides here. Ex: - // guestbook +: { - // name: "guestbook-dev", - // replicas: params.global.replicas, - // }, - }, -}; - -{ - components: { - [x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components) - }, -} diff --git a/ksonnet-guestbook/environments/dev/globals.libsonnet b/ksonnet-guestbook/environments/dev/globals.libsonnet deleted file mode 100644 index 7a73a41..0000000 --- a/ksonnet-guestbook/environments/dev/globals.libsonnet +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/ksonnet-guestbook/environments/dev/main.jsonnet b/ksonnet-guestbook/environments/dev/main.jsonnet deleted file mode 100644 index 58695a8..0000000 --- a/ksonnet-guestbook/environments/dev/main.jsonnet +++ /dev/null @@ -1,8 +0,0 @@ -local base = import "base.libsonnet"; -// uncomment if you reference ksonnet-lib -// local k = import "k.libsonnet"; - -base + { - // Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n") - // "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"}) -} diff --git a/ksonnet-guestbook/environments/dev/params.libsonnet b/ksonnet-guestbook/environments/dev/params.libsonnet deleted file mode 100644 index b6eb32d..0000000 --- a/ksonnet-guestbook/environments/dev/params.libsonnet +++ /dev/null @@ -1,17 +0,0 @@ -local params = std.extVar("__ksonnet/params"); -local globals = import "globals.libsonnet"; -local envParams = params + { - components +: { - // Insert component parameter overrides here. Ex: - // guestbook +: { - // name: "guestbook-dev", - // replicas: params.global.replicas, - // }, - }, -}; - -{ - components: { - [x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components) - }, -} diff --git a/ksonnet-guestbook/environments/prod/globals.libsonnet b/ksonnet-guestbook/environments/prod/globals.libsonnet deleted file mode 100644 index 7a73a41..0000000 --- a/ksonnet-guestbook/environments/prod/globals.libsonnet +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/ksonnet-guestbook/environments/prod/main.jsonnet b/ksonnet-guestbook/environments/prod/main.jsonnet deleted file mode 100644 index 58695a8..0000000 --- a/ksonnet-guestbook/environments/prod/main.jsonnet +++ /dev/null @@ -1,8 +0,0 @@ -local base = import "base.libsonnet"; -// uncomment if you reference ksonnet-lib -// local k = import "k.libsonnet"; - -base + { - // Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n") - // "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"}) -} diff --git a/ksonnet-guestbook/environments/prod/params.libsonnet b/ksonnet-guestbook/environments/prod/params.libsonnet deleted file mode 100644 index b6eb32d..0000000 --- a/ksonnet-guestbook/environments/prod/params.libsonnet +++ /dev/null @@ -1,17 +0,0 @@ -local params = std.extVar("__ksonnet/params"); -local globals = import "globals.libsonnet"; -local envParams = params + { - components +: { - // Insert component parameter overrides here. Ex: - // guestbook +: { - // name: "guestbook-dev", - // replicas: params.global.replicas, - // }, - }, -}; - -{ - components: { - [x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components) - }, -} diff --git a/kustomize-guestbook/guestbook-ui-deployment.yaml b/kustomize-guestbook/guestbook-ui-deployment.yaml deleted file mode 100644 index 8a0975e..0000000 --- a/kustomize-guestbook/guestbook-ui-deployment.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: guestbook-ui -spec: - replicas: 1 - revisionHistoryLimit: 3 - selector: - matchLabels: - app: guestbook-ui - template: - metadata: - labels: - app: guestbook-ui - spec: - containers: - - image: gcr.io/heptio-images/ks-guestbook-demo:0.2 - name: guestbook-ui - ports: - - containerPort: 80 diff --git a/kustomize-guestbook/guestbook-ui-svc.yaml b/kustomize-guestbook/guestbook-ui-svc.yaml deleted file mode 100644 index e619b5c..0000000 --- a/kustomize-guestbook/guestbook-ui-svc.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: guestbook-ui -spec: - ports: - - port: 80 - targetPort: 80 - selector: - app: guestbook-ui diff --git a/kustomize-guestbook/kustomization.yaml b/kustomize-guestbook/kustomization.yaml deleted file mode 100644 index cbaba90..0000000 --- a/kustomize-guestbook/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -namePrefix: kustomize- - -resources: -- guestbook-ui-deployment.yaml -- guestbook-ui-svc.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization