-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add service discovery for kong admin service
- Loading branch information
Showing
42 changed files
with
825 additions
and
82 deletions.
There are no files selected for viewing
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
4 changes: 3 additions & 1 deletion
4
config/debug/kustomization.yaml → config/debug/base/kustomization.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
# namespace: kong | ||
|
||
resources: | ||
- ../base | ||
- ../../base/ | ||
|
||
patchesStrategicMerge: | ||
- manager_debug.yaml |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kong-admin | ||
namespace: kong | ||
spec: | ||
clusterIP: "None" | ||
selector: | ||
app: proxy-kong | ||
ports: | ||
- name: admin | ||
port: 8444 | ||
targetPort: 8444 | ||
protocol: TCP |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: proxy-kong | ||
name: proxy-kong | ||
namespace: kong | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: proxy-kong | ||
template: | ||
metadata: | ||
annotations: | ||
traffic.sidecar.istio.io/includeInboundPorts: "" | ||
kuma.io/gateway: enabled | ||
kuma.io/service-account-token-volume: kong-serviceaccount-token | ||
labels: | ||
app: proxy-kong | ||
spec: | ||
serviceAccountName: kong-serviceaccount | ||
automountServiceAccountToken: false | ||
volumes: | ||
- name: kong-serviceaccount-token | ||
secret: | ||
secretName: kong-serviceaccount-token | ||
items: | ||
- key: token | ||
path: token | ||
- key: ca.crt | ||
path: ca.crt | ||
- key: namespace | ||
path: namespace | ||
containers: | ||
- name: proxy | ||
image: kong-placeholder:placeholder # This is replaced by the config/image.yaml component | ||
env: | ||
# servers | ||
- name: KONG_PROXY_LISTEN | ||
value: 0.0.0.0:8000 reuseport backlog=16384, 0.0.0.0:8443 http2 ssl reuseport backlog=16384 | ||
- name: KONG_PORT_MAPS | ||
value: "80:8000, 443:8443" | ||
- name: KONG_ADMIN_LISTEN | ||
value: 0.0.0.0:8444 http2 ssl reuseport backlog=16384 | ||
- name: KONG_STATUS_LISTEN | ||
value: 0.0.0.0:8100 | ||
# DB | ||
- name: KONG_DATABASE | ||
value: "off" | ||
# runtime tweaks | ||
- name: KONG_NGINX_WORKER_PROCESSES | ||
value: "2" | ||
- name: KONG_KIC | ||
value: "on" | ||
# logging | ||
- name: KONG_ADMIN_ACCESS_LOG | ||
value: /dev/stdout | ||
- name: KONG_ADMIN_ERROR_LOG | ||
value: /dev/stderr | ||
# - name: KONG_PROXY_ACCESS_LOG | ||
# - value: /dev/stdout | ||
- name: KONG_PROXY_ERROR_LOG | ||
value: /dev/stderr | ||
# router mode in 3.0.0. use `traditional` here for full compatibility. | ||
- name: KONG_ROUTER_FLAVOR | ||
value: traditional | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: [ "/bin/bash", "-c", "kong quit" ] | ||
ports: | ||
- name: proxy | ||
containerPort: 8000 | ||
protocol: TCP | ||
- name: proxy-ssl | ||
containerPort: 8443 | ||
protocol: TCP | ||
- name: metrics | ||
containerPort: 8100 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /status | ||
port: 8100 | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
httpGet: | ||
path: /status | ||
port: 8100 | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
failureThreshold: 3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kong-proxy | ||
namespace: kong | ||
spec: | ||
selector: | ||
app: proxy-kong |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
namespace: kong | ||
|
||
resources: | ||
- ../base | ||
- gateway_deployment.yaml | ||
- gateway_admin_service.yaml | ||
|
||
components: | ||
- ../../image/oss | ||
|
||
patchesStrategicMerge: | ||
- manager_multi_gateway_patch.yaml | ||
- gateway_service_patch.yaml | ||
|
||
patchesJson6902: | ||
- target: | ||
group: apps | ||
version: v1 | ||
kind: Deployment | ||
name: ingress-kong | ||
path: ./remove_proxy_container.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: ingress-kong | ||
name: ingress-kong | ||
namespace: kong | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: ingress-controller | ||
env: | ||
- name: CONTROLLER_LOG_LEVEL | ||
value: debug | ||
- name: CONTROLLER_KONG_ADMIN_SVC | ||
value: kong/kong-admin | ||
image: kic-placeholder:placeholder |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- op: remove | ||
path: "/spec/template/spec/containers/1" |
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
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
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
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
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
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
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
Oops, something went wrong.