Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: v1
kind: Service
metadata:
name: wallet
labels:
name: wallet
team: myice
annotations:
plugins.konghq.com: wallet-key-auth, wallet-acl
spec:
ports:
# the port that this service should serve on
- port: 10000
name: http
selector:
name: wallet
tier: backend
type: micro
---
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: kong-eventlogging-ingress
namespace: default
proxy:
path: /
route:
protocols:
- https
- http
strip_path: true
preserve_host: true
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kong-eventlogging-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: "kong"
configuration.konghq.com: kong-eventlogging-ingress
spec:
rules:
- host: ${KONG_AWS_DNS}
http:
paths:
- path: "/api/eventlogging"
backend:
serviceName: eventlogging
servicePort: http
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: eventlogging-key-auth
namespace: default #this should match the namespace of the route or service you're adding it too.
plugin: key-auth
protocols: ['http','https']
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: eventlogging-basic-auth
namespace: default #this should match the namespace of the route or service you're adding it too.
plugin: basic-auth
protocols: ['http','https']
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: eventlogging-acl
namespace: default #this should match the namespace of the route or service you're adding it too.
config:
whitelist: ['eventlogging-amadeus', 'eventlogging-advania', 'eventlogging-travelear', 'eventlogging-bookingflow']
plugin: acl
protocols: ['http','https']
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-amadeus-credential
consumerRef: amadeus-consumer
type: key-auth
config:
key: ${KONG_EVENTLOGGING_AMADEUS_API_KEY}
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-amadeus-acl
consumerRef: amadeus-consumer
type: acl
config:
group: "eventlogging-amadeus"
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-advania-credential
consumerRef: advania-consumer
type: key-auth
config:
key: ${KONG_EVENTLOGGING_ADVANIA_API_KEY}
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-advania-acl
consumerRef: advania-consumer
type: acl
config:
group: "eventlogging-advania"
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-travelear-credential
consumerRef: travelear-consumer
type: key-auth
config:
key: ${KONG_EVENTLOGGING_TRAVELEAR_API_KEY}
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-travelear-acl
consumerRef: travelear-consumer
type: acl
config:
group: "eventlogging-travelear"
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-bookingflow-credential
consumerRef: bookingflow-consumer
type: basic-auth
config:
username: ${KONG_EVENTLOGGING_BOOKINGFLOW_USER}
password: ${KONG_EVENTLOGGING_BOOKINGFLOW_PASSWORD}
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: eventlogging-bookingflow-acl
consumerRef: bookingflow-consumer
type: acl
config:
group: "eventlogging-bookingflow"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment