Commit d2226fc2 by 王昆

Merge branch 'master' of gitlab.gongsibao.com:jiangyong/k8syml

parents 73669d35 66c1856d
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: add-response-header
namespace: chaolai
config:
add:
headers:
- "demo: injected-by-kong"
plugin: response-transformer
# kubectl patch ingress demo -p '{"metadata":{"annotations":{"plugins.konghq.com":"add-response-header"}}}'
# 把插件应用到某个ingress--route/service
# kubectl patch ingress fktaxctl-ingress -p '{"metadata":{"annotations":{"plugins.konghq.com":"add-response-header"}}}'
# kubectl patch service fktaxctl-service -p '{"metadata":{"annotations":{"plugins.konghq.com":"add-response-header"}}}'
...@@ -522,7 +522,6 @@ spec: ...@@ -522,7 +522,6 @@ spec:
- env: - env:
- name: KONG_DATABASE - name: KONG_DATABASE
value: "off" value: "off"
- name: KONG_NGINX_WORKER_PROCESSES - name: KONG_NGINX_WORKER_PROCESSES
value: "1" value: "1"
- name: KONG_NGINX_HTTP_INCLUDE - name: KONG_NGINX_HTTP_INCLUDE
......
...@@ -18,7 +18,7 @@ spec: ...@@ -18,7 +18,7 @@ spec:
restartPolicy: Always restartPolicy: Always
containers: containers:
- name: center-channel - name: center-channel
image: registry.cn-beijing.aliyuncs.com/hantang2/imgshare:80.0.9 image: registry.cn-beijing.aliyuncs.com/hantang2/imgshare:80.0.34
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
......
...@@ -97,6 +97,8 @@ metadata: ...@@ -97,6 +97,8 @@ metadata:
app: fktaxctl-service app: fktaxctl-service
name: fktaxctl-service name: fktaxctl-service
namespace: chaolai namespace: chaolai
annotations:
plugins.konghq.com: add-response-header #应用插件到服务
spec: spec:
type: NodePort type: NodePort
ports: ports:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment