From 0a8e214930d61416c7f2c4bb9ccf91669f0c4ba4 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Thu, 9 Nov 2023 10:41:16 +0100 Subject: [PATCH] remove useless examples --- examples/apiproduct/dogs-cats/README.md | 34 ---------- examples/apiproduct/dogs-cats/apiproduct.yaml | 36 ----------- examples/apiproduct/dogs-cats/cats.yaml | 62 ------------------- examples/apiproduct/dogs-cats/dogs.yaml | 46 -------------- examples/apiproduct/dogs-cats/secret.yaml | 12 ---- 5 files changed, 190 deletions(-) delete mode 100644 examples/apiproduct/dogs-cats/README.md delete mode 100644 examples/apiproduct/dogs-cats/apiproduct.yaml delete mode 100644 examples/apiproduct/dogs-cats/cats.yaml delete mode 100644 examples/apiproduct/dogs-cats/dogs.yaml delete mode 100644 examples/apiproduct/dogs-cats/secret.yaml diff --git a/examples/apiproduct/dogs-cats/README.md b/examples/apiproduct/dogs-cats/README.md deleted file mode 100644 index 1637856..0000000 --- a/examples/apiproduct/dogs-cats/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Dogs and Cats API - - -## Install kuadrant - -The install command will create a namespace called `kuadrant-system` and deploy kuadrant services in that namespace. - -```bash -kuadrantctl install -``` - -## Deploy all - -```bash -kubectl apply -f examples/apiproduct/dogs-cats -``` - - -## Test - -Run kubectl port-forward in a different shell: - -```bash -❯ kubectl port-forward -n kuadrant-system service/kuadrant-gateway 9080:80 -Forwarding from [::1]:9080 -> 8080 -``` - -The service can now be accessed at `http://localhost:9080` via a browser or any other client, like curl. - -```bash -❯ curl -H "Authorization: APIKEY JUSTFORDEMOSOBVIOUSLYqDQsqSPMHkRhriEOtcRx" -H "Host: api.animaltoys.127.0.0.1.nip.io" localhost:9080/cats/toys - -❯ curl -H "Authorization: APIKEY JUSTFORDEMOSOBVIOUSLYqDQsqSPMHkRhriEOtcRx" -H "Host: api.animaltoys.127.0.0.1.nip.io" localhost:9080/dogs/toys -``` diff --git a/examples/apiproduct/dogs-cats/apiproduct.yaml b/examples/apiproduct/dogs-cats/apiproduct.yaml deleted file mode 100644 index 8e8288d..0000000 --- a/examples/apiproduct/dogs-cats/apiproduct.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -apiVersion: networking.kuadrant.io/v1beta1 -kind: APIProduct -metadata: - name: animaltoys -spec: - hosts: - - api.animaltoys.127.0.0.1.nip.io - APIs: - - name: dogs - namespace: default - tag: production - prefix: /dogs - - name: cats - namespace: default - tag: production - prefix: /cats - securityScheme: - - name: MyAPIKey - apiKeyAuth: - location: authorization_header - name: APIKEY - credential_source: - labelSelectors: - authorino.kuadrant.io/managed-by: authorino - api: animaltoys - rateLimit: - global: - maxValue: 100 - period: 30 - perRemoteIP: - maxValue: 10 - period: 30 - authenticated: - maxValue: 5 - period: 30 diff --git a/examples/apiproduct/dogs-cats/cats.yaml b/examples/apiproduct/dogs-cats/cats.yaml deleted file mode 100644 index 427de3f..0000000 --- a/examples/apiproduct/dogs-cats/cats.yaml +++ /dev/null @@ -1,62 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cats - labels: - svc: cats -spec: - selector: - matchLabels: - svc: cats - template: - metadata: - labels: - svc: cats - spec: - containers: - - name: cats - image: quay.io/3scale/authorino-examples:talker-api - env: - - name: PORT - value: "3000" - ports: - - containerPort: 3000 - replicas: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: cats-api - annotations: - discovery.kuadrant.io/scheme: "http" - discovery.kuadrant.io/api-name: "cats" - discovery.kuadrant.io/tag: "production" - discovery.kuadrant.io/port: "80" - discovery.kuadrant.io/oas-configmap: "cats-oas" - labels: - discovery.kuadrant.io/enabled: "true" -spec: - selector: - svc: cats - ports: - - port: 80 - protocol: TCP - targetPort: 3000 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: cats-oas -data: - openapi.yaml: | - openapi: "3.0.0" - info: - title: "toy API" - version: "1.0.0" - servers: - - url: http://toys/ - paths: - /toys: - get: - operationId: "getToys" diff --git a/examples/apiproduct/dogs-cats/dogs.yaml b/examples/apiproduct/dogs-cats/dogs.yaml deleted file mode 100644 index 0ba0e66..0000000 --- a/examples/apiproduct/dogs-cats/dogs.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: dogs - labels: - svc: dogs -spec: - selector: - matchLabels: - svc: dogs - template: - metadata: - labels: - svc: dogs - spec: - containers: - - name: dogs - image: quay.io/3scale/authorino-examples:talker-api - env: - - name: PORT - value: "3000" - ports: - - containerPort: 3000 - replicas: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: dogs-api - annotations: - discovery.kuadrant.io/scheme: "http" - discovery.kuadrant.io/api-name: "dogs" - discovery.kuadrant.io/tag: "production" - discovery.kuadrant.io/port: "80" - discovery.kuadrant.io/matchpath: "/" - discovery.kuadrant.io/matchpath-type: Prefix - labels: - discovery.kuadrant.io/enabled: "true" -spec: - selector: - svc: dogs - ports: - - port: 80 - protocol: TCP - targetPort: 3000 diff --git a/examples/apiproduct/dogs-cats/secret.yaml b/examples/apiproduct/dogs-cats/secret.yaml deleted file mode 100644 index 06fe3a7..0000000 --- a/examples/apiproduct/dogs-cats/secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: user-secret-apikey - annotations: - secret.kuadrant.io/user-id: user-01 - labels: - authorino.kuadrant.io/managed-by: authorino - api: animaltoys -stringData: - api_key: JUSTFORDEMOSOBVIOUSLYqDQsqSPMHkRhriEOtcRx -type: Opaque