From eb40c2731d556142b246d08b5d92576adcb5b95f Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 30 Aug 2020 23:56:51 +0800 Subject: [PATCH] remove files --- example/etcd/demo/Makefile | 13 - example/etcd/demo/etcdmon.yaml | 15 - example/etcd/discov-namespace.yaml | 4 - example/etcd/etcd.yaml | 378 ------------------ example/etcd/pub/Makefile | 11 - example/etcd/pub/pub.yaml | 26 -- example/etcd/sub/Makefile | 11 - example/etcd/sub/sub.yaml | 16 - example/graceful/dns/api/Makefile | 11 - example/graceful/dns/api/graceful.yaml | 42 -- example/graceful/dns/rpc/Makefile | 11 - example/graceful/dns/rpc/gracefulrpc.yaml | 46 --- example/graceful/etcd/api/Makefile | 13 - example/graceful/etcd/api/graceful.yaml | 42 -- example/graceful/etcd/rpc/Makefile | 13 - .../graceful/etcd/rpc/gracefulrpc-env.yaml | 30 -- .../etcd/rpc/gracefulrpc-headless.yaml | 41 -- example/graceful/etcd/rpc/gracefulrpc.yaml | 25 -- example/load/simulate/cpu/Makefile | 13 - example/load/simulate/cpu/shedding.yaml | 17 - example/rpc/client/direct/Makefile | 10 - example/rpc/client/direct/unarydirect.yaml | 23 -- example/rpc/proxy/unaryproxy.yaml | 46 --- example/rpc/server/unary/Makefile | 11 - example/rpc/server/unary/unaryserver.yaml | 25 -- tools/goctl/gen/template.go | 19 +- 26 files changed, 1 insertion(+), 911 deletions(-) delete mode 100644 example/etcd/demo/Makefile delete mode 100644 example/etcd/demo/etcdmon.yaml delete mode 100644 example/etcd/discov-namespace.yaml delete mode 100644 example/etcd/etcd.yaml delete mode 100644 example/etcd/pub/Makefile delete mode 100644 example/etcd/pub/pub.yaml delete mode 100644 example/etcd/sub/Makefile delete mode 100644 example/etcd/sub/sub.yaml delete mode 100644 example/graceful/dns/api/Makefile delete mode 100644 example/graceful/dns/api/graceful.yaml delete mode 100644 example/graceful/dns/rpc/Makefile delete mode 100644 example/graceful/dns/rpc/gracefulrpc.yaml delete mode 100644 example/graceful/etcd/api/Makefile delete mode 100644 example/graceful/etcd/api/graceful.yaml delete mode 100644 example/graceful/etcd/rpc/Makefile delete mode 100644 example/graceful/etcd/rpc/gracefulrpc-env.yaml delete mode 100644 example/graceful/etcd/rpc/gracefulrpc-headless.yaml delete mode 100644 example/graceful/etcd/rpc/gracefulrpc.yaml delete mode 100644 example/load/simulate/cpu/Makefile delete mode 100644 example/load/simulate/cpu/shedding.yaml delete mode 100644 example/rpc/client/direct/Makefile delete mode 100644 example/rpc/client/direct/unarydirect.yaml delete mode 100644 example/rpc/proxy/unaryproxy.yaml delete mode 100644 example/rpc/server/unary/Makefile delete mode 100644 example/rpc/server/unary/unaryserver.yaml diff --git a/example/etcd/demo/Makefile b/example/etcd/demo/Makefile deleted file mode 100644 index 06b86926..00000000 --- a/example/etcd/demo/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - #docker pull alpine - #docker pull golang:alpine - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/etcdmon:$(version) . -f example/etcd/demo/Dockerfile - #docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/etcdmon:$(version) - -deploy: push - kubectl -n xx-xiaoheiban set image deployment/etcdmon-deployment etcdmon=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcdmon:$(version) diff --git a/example/etcd/demo/etcdmon.yaml b/example/etcd/demo/etcdmon.yaml deleted file mode 100644 index 0aef9940..00000000 --- a/example/etcd/demo/etcdmon.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: etcdmon - namespace: discov -spec: - containers: - - name: etcdmon - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcdmon:v200620093045 - imagePullPolicy: Always - env: - - name: ETCD_CLUSTER - value: etcd.discov:2379 - imagePullSecrets: - - name: aliyun diff --git a/example/etcd/discov-namespace.yaml b/example/etcd/discov-namespace.yaml deleted file mode 100644 index e428b332..00000000 --- a/example/etcd/discov-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: discovery diff --git a/example/etcd/etcd.yaml b/example/etcd/etcd.yaml deleted file mode 100644 index 4277e6bc..00000000 --- a/example/etcd/etcd.yaml +++ /dev/null @@ -1,378 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: discov - namespace: discovery -spec: - ports: - - name: discov-port - port: 2379 - protocol: TCP - targetPort: 2379 - selector: - app: discov - ---- - -apiVersion: v1 -kind: Pod -metadata: - labels: - app: discov - discov_node: discov0 - name: discov0 - namespace: discovery -spec: - containers: - - command: - - /usr/local/bin/etcd - - --name - - discov0 - - --initial-advertise-peer-urls - - http://discov0:2380 - - --listen-peer-urls - - http://0.0.0.0:2380 - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://discov0:2379 - - --initial-cluster - - discov0=http://discov0:2380,discov1=http://discov1:2380,discov2=http://discov2:2380,discov3=http://discov3:2380,discov4=http://discov4:2380 - - --initial-cluster-state - - new - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest - name: discov0 - ports: - - containerPort: 2379 - name: client - protocol: TCP - - containerPort: 2380 - name: server - protocol: TCP - imagePullSecrets: - - name: aliyun - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - discov - topologyKey: "kubernetes.io/hostname" - restartPolicy: Always - ---- - -apiVersion: v1 -kind: Service -metadata: - labels: - discov_node: discov0 - name: discov0 - namespace: discovery -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: server - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - discov_node: discov0 - ---- - -apiVersion: v1 -kind: Pod -metadata: - labels: - app: discov - discov_node: discov1 - name: discov1 - namespace: discovery -spec: - containers: - - command: - - /usr/local/bin/etcd - - --name - - discov1 - - --initial-advertise-peer-urls - - http://discov1:2380 - - --listen-peer-urls - - http://0.0.0.0:2380 - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://discov1:2379 - - --initial-cluster - - discov0=http://discov0:2380,discov1=http://discov1:2380,discov2=http://discov2:2380,discov3=http://discov3:2380,discov4=http://discov4:2380 - - --initial-cluster-state - - new - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest - name: discov1 - ports: - - containerPort: 2379 - name: client - protocol: TCP - - containerPort: 2380 - name: server - protocol: TCP - imagePullSecrets: - - name: aliyun - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - discov - topologyKey: "kubernetes.io/hostname" - restartPolicy: Always - ---- - -apiVersion: v1 -kind: Service -metadata: - labels: - discov_node: discov1 - name: discov1 - namespace: discovery -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: server - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - discov_node: discov1 - ---- - -apiVersion: v1 -kind: Pod -metadata: - labels: - app: discov - discov_node: discov2 - name: discov2 - namespace: discovery -spec: - containers: - - command: - - /usr/local/bin/etcd - - --name - - discov2 - - --initial-advertise-peer-urls - - http://discov2:2380 - - --listen-peer-urls - - http://0.0.0.0:2380 - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://discov2:2379 - - --initial-cluster - - discov0=http://discov0:2380,discov1=http://discov1:2380,discov2=http://discov2:2380,discov3=http://discov3:2380,discov4=http://discov4:2380 - - --initial-cluster-state - - new - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest - name: discov2 - ports: - - containerPort: 2379 - name: client - protocol: TCP - - containerPort: 2380 - name: server - protocol: TCP - imagePullSecrets: - - name: aliyun - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - discov - topologyKey: "kubernetes.io/hostname" - restartPolicy: Always - ---- - -apiVersion: v1 -kind: Service -metadata: - labels: - discov_node: discov2 - name: discov2 - namespace: discovery -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: server - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - discov_node: discov2 - ---- - -apiVersion: v1 -kind: Pod -metadata: - labels: - app: discov - discov_node: discov3 - name: discov3 - namespace: discovery -spec: - containers: - - command: - - /usr/local/bin/etcd - - --name - - discov3 - - --initial-advertise-peer-urls - - http://discov3:2380 - - --listen-peer-urls - - http://0.0.0.0:2380 - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://discov3:2379 - - --initial-cluster - - discov0=http://discov0:2380,discov1=http://discov1:2380,discov2=http://discov2:2380,discov3=http://discov3:2380,discov4=http://discov4:2380 - - --initial-cluster-state - - new - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest - name: discov3 - ports: - - containerPort: 2379 - name: client - protocol: TCP - - containerPort: 2380 - name: server - protocol: TCP - imagePullSecrets: - - name: aliyun - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - discov - topologyKey: "kubernetes.io/hostname" - restartPolicy: Always - ---- - -apiVersion: v1 -kind: Service -metadata: - labels: - discov_node: discov3 - name: discov3 - namespace: discovery -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: server - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - discov_node: discov3 - ---- - -apiVersion: v1 -kind: Pod -metadata: - labels: - app: discov - discov_node: discov4 - name: discov4 - namespace: discovery -spec: - containers: - - command: - - /usr/local/bin/etcd - - --name - - discov4 - - --initial-advertise-peer-urls - - http://discov4:2380 - - --listen-peer-urls - - http://0.0.0.0:2380 - - --listen-client-urls - - http://0.0.0.0:2379 - - --advertise-client-urls - - http://discov4:2379 - - --initial-cluster - - discov0=http://discov0:2380,discov1=http://discov1:2380,discov2=http://discov2:2380,discov3=http://discov3:2380,discov4=http://discov4:2380 - - --initial-cluster-state - - new - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest - name: discov4 - ports: - - containerPort: 2379 - name: client - protocol: TCP - - containerPort: 2380 - name: server - protocol: TCP - imagePullSecrets: - - name: aliyun - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - discov - topologyKey: "kubernetes.io/hostname" - restartPolicy: Always - ---- - -apiVersion: v1 -kind: Service -metadata: - labels: - discov_node: discov4 - name: discov4 - namespace: discovery -spec: - ports: - - name: client - port: 2379 - protocol: TCP - targetPort: 2379 - - name: server - port: 2380 - protocol: TCP - targetPort: 2380 - selector: - discov_node: discov4 diff --git a/example/etcd/pub/Makefile b/example/etcd/pub/Makefile deleted file mode 100644 index 7bfa4f87..00000000 --- a/example/etcd/pub/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/pub:$(version) . -f example/etcd/pub/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/pub:$(version) - -deploy: push - kubectl -n adhoc set image deployment/pub-deployment pub=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/pub:$(version) diff --git a/example/etcd/pub/pub.yaml b/example/etcd/pub/pub.yaml deleted file mode 100644 index 02de5c48..00000000 --- a/example/etcd/pub/pub.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: pub-deployment - namespace: adhoc - labels: - app: pub -spec: - replicas: 1 - selector: - matchLabels: - app: pub - template: - metadata: - labels: - app: pub - spec: - containers: - - name: pub - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/pub:v200213172101 - command: - - /app/pub - - -v - - ccc - imagePullSecrets: - - name: aliyun diff --git a/example/etcd/sub/Makefile b/example/etcd/sub/Makefile deleted file mode 100644 index a16f5015..00000000 --- a/example/etcd/sub/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/sub:$(version) . -f example/etcd/sub/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/sub:$(version) - -deploy: push - kubectl -n adhoc set image deployment/sub-deployment sub=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/sub:$(version) diff --git a/example/etcd/sub/sub.yaml b/example/etcd/sub/sub.yaml deleted file mode 100644 index ae5af089..00000000 --- a/example/etcd/sub/sub.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - labels: - app: sub - name: sub - namespace: adhoc -spec: - containers: - - command: - - /app/sub - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/sub:v200213220509 - name: sub - imagePullSecrets: - - name: aliyun - restartPolicy: Always diff --git a/example/graceful/dns/api/Makefile b/example/graceful/dns/api/Makefile deleted file mode 100644 index 1e36f6e0..00000000 --- a/example/graceful/dns/api/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - docker pull alpine - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) . -f example/graceful/dns/api/Dockerfile - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) - -deploy: push - kubectl -n kevin set image deployment/graceful-deployment graceful=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) diff --git a/example/graceful/dns/api/graceful.yaml b/example/graceful/dns/api/graceful.yaml deleted file mode 100644 index 15c7e795..00000000 --- a/example/graceful/dns/api/graceful.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: graceful - namespace: kevin -spec: - selector: - app: graceful - type: ClusterIP - ports: - - name: graceful-port - port: 3333 - targetPort: 8888 - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: graceful-deployment - namespace: kevin - labels: - app: graceful -spec: - replicas: 3 - selector: - matchLabels: - app: graceful - template: - metadata: - labels: - app: graceful - spec: - containers: - - name: graceful - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/graceful:v191022133857 - imagePullPolicy: Always - ports: - - containerPort: 8888 - imagePullSecrets: - - name: aliyun - diff --git a/example/graceful/dns/rpc/Makefile b/example/graceful/dns/rpc/Makefile deleted file mode 100644 index dd3dd344..00000000 --- a/example/graceful/dns/rpc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - docker pull alpine - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) . -f example/graceful/dns/rpc/Dockerfile - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) - -deploy: push - kubectl -n kevin set image deployment/gracefulrpc-deployment gracefulrpc=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) diff --git a/example/graceful/dns/rpc/gracefulrpc.yaml b/example/graceful/dns/rpc/gracefulrpc.yaml deleted file mode 100644 index 61ea3595..00000000 --- a/example/graceful/dns/rpc/gracefulrpc.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: gracefulrpc - namespace: kevin -spec: - selector: - app: gracefulrpc - type: ClusterIP - clusterIP: None - ports: - - name: gracefulrpc-port - port: 3456 - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gracefulrpc-deployment - namespace: kevin - labels: - app: gracefulrpc -spec: - replicas: 3 - selector: - matchLabels: - app: gracefulrpc - template: - metadata: - labels: - app: gracefulrpc - spec: - containers: - - name: gracefulrpc - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:v191022143425 - imagePullPolicy: Always - ports: - - containerPort: 3456 - env: - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - imagePullSecrets: - - name: aliyun diff --git a/example/graceful/etcd/api/Makefile b/example/graceful/etcd/api/Makefile deleted file mode 100644 index 6db78177..00000000 --- a/example/graceful/etcd/api/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - docker pull alpine - docker pull golang:alpine - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) . -f example/graceful/etcd/api/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) - -deploy: push - kubectl -n kevin set image deployment/graceful-deployment graceful=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/graceful:$(version) diff --git a/example/graceful/etcd/api/graceful.yaml b/example/graceful/etcd/api/graceful.yaml deleted file mode 100644 index cc6925e8..00000000 --- a/example/graceful/etcd/api/graceful.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: graceful - namespace: kevin -spec: - selector: - app: graceful - type: ClusterIP - ports: - - name: graceful-port - port: 3333 - targetPort: 8888 - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: graceful-deployment - namespace: kevin - labels: - app: graceful -spec: - replicas: 3 - selector: - matchLabels: - app: graceful - template: - metadata: - labels: - app: graceful - spec: - containers: - - name: graceful - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/graceful:v191031145905 - imagePullPolicy: Always - ports: - - containerPort: 8888 - imagePullSecrets: - - name: aliyun - diff --git a/example/graceful/etcd/rpc/Makefile b/example/graceful/etcd/rpc/Makefile deleted file mode 100644 index c15956c7..00000000 --- a/example/graceful/etcd/rpc/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - docker pull alpine - docker pull golang:alpine - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) . -f example/graceful/etcd/rpc/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) - -deploy: push - kubectl -n kevin set image deployment/gracefulrpc-deployment gracefulrpc=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:$(version) diff --git a/example/graceful/etcd/rpc/gracefulrpc-env.yaml b/example/graceful/etcd/rpc/gracefulrpc-env.yaml deleted file mode 100644 index 9de5207f..00000000 --- a/example/graceful/etcd/rpc/gracefulrpc-env.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gracefulrpc-deployment - namespace: kevin - labels: - app: gracefulrpc -spec: - replicas: 9 - selector: - matchLabels: - app: gracefulrpc - template: - metadata: - labels: - app: gracefulrpc - spec: - containers: - - name: gracefulrpc - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:v191031144304 - imagePullPolicy: Always - ports: - - containerPort: 3456 - env: - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - imagePullSecrets: - - name: aliyun diff --git a/example/graceful/etcd/rpc/gracefulrpc-headless.yaml b/example/graceful/etcd/rpc/gracefulrpc-headless.yaml deleted file mode 100644 index b635ccea..00000000 --- a/example/graceful/etcd/rpc/gracefulrpc-headless.yaml +++ /dev/null @@ -1,41 +0,0 @@ - apiVersion: v1 - kind: Service - metadata: - name: gracefulrpc - namespace: kevin - spec: - selector: - app: gracefulrpc - type: ClusterIP - clusterIP: None - ports: - - name: gracefulrpc-port - port: 3456 - - --- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gracefulrpc-deployment - namespace: kevin - labels: - app: gracefulrpc -spec: - replicas: 9 - selector: - matchLabels: - app: gracefulrpc - template: - metadata: - labels: - app: gracefulrpc - spec: - containers: - - name: gracefulrpc - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:v191031144304 - imagePullPolicy: Always - ports: - - containerPort: 3456 - imagePullSecrets: - - name: aliyun diff --git a/example/graceful/etcd/rpc/gracefulrpc.yaml b/example/graceful/etcd/rpc/gracefulrpc.yaml deleted file mode 100644 index 862dab1a..00000000 --- a/example/graceful/etcd/rpc/gracefulrpc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gracefulrpc-deployment - namespace: kevin - labels: - app: gracefulrpc -spec: - replicas: 9 - selector: - matchLabels: - app: gracefulrpc - template: - metadata: - labels: - app: gracefulrpc - spec: - containers: - - name: gracefulrpc - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/gracefulrpc:v191031144304 - imagePullPolicy: Always - ports: - - containerPort: 3456 - imagePullSecrets: - - name: aliyun diff --git a/example/load/simulate/cpu/Makefile b/example/load/simulate/cpu/Makefile deleted file mode 100644 index 3df40e86..00000000 --- a/example/load/simulate/cpu/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -version := v1 - -build: - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/shedding:$(version) . -f example/load/simulate/cpu/Dockerfile - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/shedding:$(version) - -deploy: push - kubectl apply -f shedding.yaml - -clean: - kubectl delete -f shedding.yaml diff --git a/example/load/simulate/cpu/shedding.yaml b/example/load/simulate/cpu/shedding.yaml deleted file mode 100644 index 8089e2f5..00000000 --- a/example/load/simulate/cpu/shedding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: shedding - namespace: adhoc -spec: - containers: - - name: shedding - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/shedding:v1 - imagePullPolicy: Always - resources: - requests: - cpu: 1000m - limits: - cpu: 1000m - imagePullSecrets: - - name: aliyun diff --git a/example/rpc/client/direct/Makefile b/example/rpc/client/direct/Makefile deleted file mode 100644 index 2c8abca6..00000000 --- a/example/rpc/client/direct/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/unarydirect:$(version) . -f example/rpc/client/direct/Dockerfile - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/unarydirect:$(version) - -deploy: push - kubectl -n adhoc set image deployment/unarydirect-deployment unarydirect=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/unarydirect:$(version) diff --git a/example/rpc/client/direct/unarydirect.yaml b/example/rpc/client/direct/unarydirect.yaml deleted file mode 100644 index 57358f73..00000000 --- a/example/rpc/client/direct/unarydirect.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: unarydirect-deployment - namespace: adhoc - labels: - app: unarydirect -spec: - replicas: 1 - selector: - matchLabels: - app: unarydirect - template: - metadata: - labels: - app: unarydirect - spec: - containers: - - name: unarydirect - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/unarydirect:v1 - imagePullPolicy: Always - imagePullSecrets: - - name: aliyun diff --git a/example/rpc/proxy/unaryproxy.yaml b/example/rpc/proxy/unaryproxy.yaml deleted file mode 100644 index d9526cdc..00000000 --- a/example/rpc/proxy/unaryproxy.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: unaryproxy - namespace: kevin -spec: - selector: - app: unaryproxy - ports: - - name: unaryproxy-port - port: 3456 - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: unaryproxy-deployment - namespace: kevin - labels: - app: unaryproxy -spec: - replicas: 3 - selector: - matchLabels: - app: unaryproxy - template: - metadata: - labels: - app: unaryproxy - spec: - containers: - - name: unaryproxy - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/unaryproxy:v1 - imagePullPolicy: Always - ports: - - containerPort: 3456 - volumeMounts: - - name: timezone - mountPath: /etc/localtime - imagePullSecrets: - - name: aliyun - volumes: - - name: timezone - hostPath: - path: /usr/share/zoneinfo/Asia/Shanghai diff --git a/example/rpc/server/unary/Makefile b/example/rpc/server/unary/Makefile deleted file mode 100644 index 1ed2aea0..00000000 --- a/example/rpc/server/unary/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -version := v1 - -build: - cd $(GOPATH)/src/zero && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/unaryserver:$(version) . -f example/rpc/server/unary/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/unaryserver:$(version) - -deploy: push - kubectl -n adhoc set image deployment/unaryserver-deployment unaryserver=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/unaryserver:$(version) diff --git a/example/rpc/server/unary/unaryserver.yaml b/example/rpc/server/unary/unaryserver.yaml deleted file mode 100644 index c5716b4b..00000000 --- a/example/rpc/server/unary/unaryserver.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: unaryserver-deployment - namespace: adhoc - labels: - app: unaryserver -spec: - replicas: 3 - selector: - matchLabels: - app: unaryserver - template: - metadata: - labels: - app: unaryserver - spec: - containers: - - name: unaryserver - image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/unaryserver:v1 - imagePullPolicy: Always - ports: - - containerPort: 3456 - imagePullSecrets: - - name: aliyun diff --git a/tools/goctl/gen/template.go b/tools/goctl/gen/template.go index 5ece86ad..d3086fb2 100644 --- a/tools/goctl/gen/template.go +++ b/tools/goctl/gen/template.go @@ -1,7 +1,6 @@ package gen -const ( - dockerTemplate = `FROM golang:alpine AS builder +const dockerTemplate = `FROM golang:alpine AS builder LABEL stage=gobuilder @@ -26,19 +25,3 @@ COPY --from=builder /app/{{.exeFile}} /app/{{.exeFile}} CMD ["./{{.exeFile}}"{{.argument}}] ` - - makefileTemplate = `version := v$(shell /bin/date "+%y%m%d%H%M%S") - -build: - docker pull alpine - docker pull golang:alpine - cd $(GOPATH)/src/xiao && docker build -t registry.cn-hangzhou.aliyuncs.com/xapp/{{.exeFile}}:$(version) . -f {{.relPath}}/Dockerfile - docker image prune --filter label=stage=gobuilder -f - -push: build - docker push registry.cn-hangzhou.aliyuncs.com/xapp/{{.exeFile}}:$(version) - -deploy: push - kubectl -n {{.namespace}} set image deployment/{{.exeFile}}-deployment {{.exeFile}}=registry-vpc.cn-hangzhou.aliyuncs.com/xapp/{{.exeFile}}:$(version) -` -)