Created
March 18, 2019 16:19
-
-
Save davideagle/ac00aba77cb3641b978f703e09a86e85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: micro-cms-content | |
labels: | |
name: micro-cms-content | |
team: flip | |
annotations: | |
plugins.konghq.com: micro-cms-content-basic-auth, contentstack-consumer-acl | |
spec: | |
ports: | |
# the port that this service should serve on | |
- port: 10000 | |
name: http | |
selector: | |
name: micro-cms-content | |
tier: backend | |
--- | |
apiVersion: configuration.konghq.com/v1 | |
kind: KongIngress | |
metadata: | |
name: micro-cms-content-kong-ingress | |
namespace: default | |
proxy: | |
path: /api/micro-cms-content | |
route: | |
protocols: | |
- https | |
- http | |
strip_path: true | |
preserve_host: true | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: kong-micro-cms-content-ingress | |
namespace: default | |
annotations: | |
kubernetes.io/ingress.class: "kong" | |
configuration.konghq.com: micro-cms-content-kong-ingress | |
spec: | |
tls: | |
- hosts: | |
- ${KONG_AWS_DNS} | |
secretName: ${KONG_AWS_CERT_NAME} | |
rules: | |
- host: ${KONG_AWS_DNS} | |
http: | |
paths: | |
- path: "/tourcategoriesupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/contentbeltupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/contentupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/contentstackupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/contentstackupdatemore" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/contentstacktourcategoriesupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
- path: "/salesforceupdate" | |
backend: | |
serviceName: micro-cms-content | |
servicePort: http | |
--- | |
apiVersion: configuration.konghq.com/v1 | |
kind: KongPlugin | |
metadata: | |
name: micro-cms-content-basic-auth | |
namespace: default #this should match the namespace of the route or service you're adding it too. | |
plugin: basic-auth | |
--- | |
apiVersion: configuration.konghq.com/v1 | |
kind: KongPlugin | |
metadata: | |
name: contentstack-consumer-acl | |
namespace: default #this should match the namespace of the route or service you're adding it too. | |
config: | |
whitelist: ['contentstack-consumer'] | |
plugin: acl | |
--- | |
# Contentstack Consumer and credentials | |
apiVersion: configuration.konghq.com/v1 | |
kind: KongConsumer | |
metadata: | |
name: contentstack-consumer | |
username: contentstack | |
--- | |
apiVersion: configuration.konghq.com/v1 | |
kind: KongCredential | |
metadata: | |
name: contentstack-credential | |
consumerRef: contentstack-consumer | |
type: basic-auth | |
config: | |
username: user | |
password: pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment