From f92cdcefe4aca28c47e5d47cde0c721161340c42 Mon Sep 17 00:00:00 2001 From: szihai Date: Mon, 26 Oct 2020 20:10:36 -0700 Subject: [PATCH] polish for pr --- documentation/kubecondemo/script/backend.yaml | 73 ------------------- .../kubecondemo/script/webservice.yaml | 54 -------------- .../kubecondemo/{vela.yml => vela.yaml} | 0 3 files changed, 127 deletions(-) delete mode 100644 documentation/kubecondemo/script/backend.yaml delete mode 100644 documentation/kubecondemo/script/webservice.yaml rename documentation/kubecondemo/{vela.yml => vela.yaml} (100%) diff --git a/documentation/kubecondemo/script/backend.yaml b/documentation/kubecondemo/script/backend.yaml deleted file mode 100644 index e9651af72..000000000 --- a/documentation/kubecondemo/script/backend.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: core.oam.dev/v1alpha2 -kind: WorkloadDefinition -metadata: - name: backend - annotations: - definition.oam.dev/apiVersion: "standard.oam.dev/v1alpha1" - definition.oam.dev/kind: "PodSpecWorkload" - definition.oam.dev/description: "Backend worker without ports exposed" -spec: - definitionRef: - name: backend - childResourceKinds: - - apiVersion: apps/v1 - kind: Deployment - extension: - template: | - output: { - apiVersion: "standard.oam.dev/v1alpha1" - kind: "PodSpecWorkload" - metadata: name: parameter.name - spec: { - replicas: 1 - podSpec: { - containers: [{ - image: parameter.image - name: parameter.name - env: [ - for e in parameter.env { - if (e._useSecret==true) - { - name: e.name - valueFrom: { - secretKeyRef: { - name: e.secretKeyRef.name - key: e.secretKeyRef.key - } - } - _useSecret: true - } - if (e._useSecret==false) - { - name: e.name - value: e.value - _useSecret: false - } - } - ] - ports: [{ - containerPort: parameter.port - protocol: "TCP" - name: "default" - }] - }] - } - } - } - #backend: { - name: string - image: string - port: int - - env: [...{ - name: string - value: string | *"" - _useSecret: *false | bool - secretKeyRef: { - name: string | *"" - key: string | *"" - } - ... - }] - } - parameter: #backend \ No newline at end of file diff --git a/documentation/kubecondemo/script/webservice.yaml b/documentation/kubecondemo/script/webservice.yaml deleted file mode 100644 index 4596425ed..000000000 --- a/documentation/kubecondemo/script/webservice.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: core.oam.dev/v1alpha2 -kind: WorkloadDefinition -metadata: - name: webservice - annotations: - definition.oam.dev/apiVersion: "standard.oam.dev/v1alpha1" - definition.oam.dev/kind: "PodSpecWorkload" - definition.oam.dev/description: "Flight tracker web ui" -spec: - definitionRef: - name: podspecworkloads.standard.oam.dev - childResourceKinds: - - apiVersion: apps/v1 - kind: Deployment - - apiVersion: v1 - kind: Service - extension: - template: | - output: { - apiVersion: "standard.oam.dev/v1alpha1" - kind: "PodSpecWorkload" - metadata: name: parameter.name - spec: { - replicas: 1 - podSpec: { - containers: [{ - image: parameter.image - name: parameter.name - env: parameter.env - ports: [{ - containerPort: parameter.port - protocol: "TCP" - }] - }] - } - } - } - #webservice: { - name: string - image: string - port: int - - env: [...{ - name: string - value?: string - valueFrom?: { - secretKeyRef: { - name: string - key: string - } - } - }] - } - parameter: #webservice \ No newline at end of file diff --git a/documentation/kubecondemo/vela.yml b/documentation/kubecondemo/vela.yaml similarity index 100% rename from documentation/kubecondemo/vela.yml rename to documentation/kubecondemo/vela.yaml