This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/kong] add nginx custom template feature via config map #15079
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4ff1696
[stable/kong] added custom nginx template injection capability via co…
Mattzr 093791b
[stable/kong] bump version
Mattzr baf0791
[stable/kong] added missing space in comment
Mattzr fe0d142
[stable/kong] bump app version to 0.14.0
Mattzr 3da2af7
[stable/kong] removed configurable configmap and extra pod ports not …
Mattzr ab23523
[stable/kong] remove metrics for controller cause it's hardly used an…
Mattzr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,29 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kong-default-custom-server-blocks | ||
labels: | ||
app: {{ template "kong.name" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
data: | ||
servers.conf: | | ||
# Prometheus metrics server | ||
server { | ||
server_name kong_prometheus_exporter; | ||
listen 0.0.0.0:9542; # can be any other port as well | ||
access_log off; | ||
location /metrics { | ||
default_type text/plain; | ||
content_by_lua_block { | ||
local prometheus = require "kong.plugins.prometheus.exporter" | ||
prometheus:collect() | ||
} | ||
} | ||
location /nginx_status { | ||
internal; | ||
access_log off; | ||
stub_status; | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this container, please expose
9542
and call that portmetrics
so that Prometheus can automatically scrape this endpoint.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hba
done removing server block from controller and adding metrics port to Kong pods.
Shall the podAnnotations: default to prometheus annotation then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing the port should be enough for some installations while some other installations might need the annotation.
Since pod annotations are already configurable, the user can add those if required.
This is something we can add those too later but I'm being cautious and doing this change incrementally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok good point. Since all pods would have the prometheus metrics I thought having the prometheus annotations too would make sense.
Right ok - let me know if there's anything else missing then.