From 2feddcb74e7edb26708c06e57540def6bd921246 Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Sun, 28 Apr 2024 09:59:47 +0800 Subject: [PATCH] add yaml of sample applications Signed-off-by: LiZhenCheng9527 --- samples/httpbin/httpbin.yaml | 43 ++++++++++++++++++++++++++++++++ samples/sleep/sleep.yaml | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 samples/httpbin/httpbin.yaml create mode 100644 samples/sleep/sleep.yaml diff --git a/samples/httpbin/httpbin.yaml b/samples/httpbin/httpbin.yaml new file mode 100644 index 000000000..6fa17c0a2 --- /dev/null +++ b/samples/httpbin/httpbin.yaml @@ -0,0 +1,43 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: httpbin +--- +apiVersion: v1 +kind: Service +metadata: + name: httpbin + labels: + app: httpbin + service: httpbin +spec: + ports: + - name: http + port: 8000 + targetPort: 80 + selector: + app: httpbin +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: httpbin +spec: + replicas: 1 + selector: + matchLabels: + app: httpbin + version: v1 + template: + metadata: + labels: + app: httpbin + version: v1 + spec: + serviceAccountName: httpbin + containers: + - image: docker.io/kong/httpbin + imagePullPolicy: IfNotPresent + name: httpbin + ports: + - containerPort: 80 diff --git a/samples/sleep/sleep.yaml b/samples/sleep/sleep.yaml new file mode 100644 index 000000000..3de7d6f46 --- /dev/null +++ b/samples/sleep/sleep.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: sleep +--- +apiVersion: v1 +kind: Service +metadata: + name: sleep + labels: + app: sleep + service: sleep +spec: + ports: + - port: 80 + name: http + selector: + app: sleep +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sleep +spec: + replicas: 1 + selector: + matchLabels: + app: sleep + template: + metadata: + labels: + app: sleep + spec: + terminationGracePeriodSeconds: 0 + serviceAccountName: sleep + containers: + - name: sleep + image: curlimages/curl + command: ["/bin/sleep", "infinity"] + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /etc/sleep/tls + name: secret-volume + volumes: + - name: secret-volume + secret: + secretName: sleep-secret + optional: true