-
Notifications
You must be signed in to change notification settings - Fork 11
Added service annotations to values, added services to expose built-in servers #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robertkubik-secro
wants to merge
1
commit into
cloudprober:main
Choose a base branch
from
robertkubik-secro:service-feature
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 hidden or 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 hidden or 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 hidden or 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,21 @@ | ||
| {{- if .Values.builtinServers.http.enabled }} | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "cloudprober.fullname" . }}-builtin-http | ||
| labels: | ||
| {{- include "cloudprober.labels" . | nindent 4 }} | ||
| {{- with .Values.builtinServers.http.service.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| type: {{ .Values.builtinServers.http.service.type }} | ||
| ports: | ||
| - port: {{ .Values.builtinServers.http.service.port }} | ||
| targetPort: builtin-http | ||
| protocol: TCP | ||
| name: builtin-http | ||
| selector: | ||
| {{- include "cloudprober.selectorLabels" . | nindent 4 }} | ||
| {{- end }} |
This file contains hidden or 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,21 @@ | ||
| {{- if .Values.builtinServers.udp.enabled }} | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "cloudprober.fullname" . }}-builtin-udp | ||
| labels: | ||
| {{- include "cloudprober.labels" . | nindent 4 }} | ||
| {{- with .Values.builtinServers.udp.service.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| type: {{ .Values.builtinServers.udp.service.type }} | ||
| ports: | ||
| - port: {{ .Values.builtinServers.udp.service.port }} | ||
| targetPort: builtin-udp | ||
| protocol: UDP | ||
| name: builtin-udp | ||
| selector: | ||
| {{- include "cloudprober.selectorLabels" . | nindent 4 }} | ||
| {{- end }} |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -143,6 +143,35 @@ shareProcessNamespace: true | |
| service: | ||
| type: ClusterIP | ||
| port: 8080 | ||
| annotations: {} | ||
|
|
||
| # Built-in cloudprober servers (https://cloudprober.org/docs/how-to/built-in-servers/). | ||
| # When enabled, the chart appends a corresponding `server { ... }` block to | ||
| # the rendered cloudprober config, opens the container port on the pod, and | ||
| # creates a dedicated Kubernetes Service that exposes it. | ||
| # | ||
| # Note: automatic config injection only works with the default `cfg` | ||
| # (protobuf text) configFormat. If you are using `yaml`/`json`, declare the | ||
| # server blocks manually in `config` and just use this section to expose | ||
| # the ports. | ||
| builtinServers: | ||
| http: | ||
| enabled: false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just stick to adding services and trust user to add corresponding server stanzas. Just call it additionalServices and you can say in the comment that it will be useful to expose cloudprober's built-in servers if configured. |
||
| port: 3141 | ||
| service: | ||
| type: ClusterIP | ||
| port: 3141 | ||
| annotations: {} | ||
| udp: | ||
| enabled: false | ||
| port: 31415 | ||
| # UDP server mode: ECHO bounces packets back to the sender, DISCARD drops | ||
| # them silently. | ||
| mode: ECHO | ||
| service: | ||
| type: ClusterIP | ||
| port: 31415 | ||
| annotations: {} | ||
|
|
||
| serviceMonitor: | ||
| enabled: true | ||
|
|
||
Oops, something went wrong.
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.
I this this is going to be trouble. I'd stick with just adding additional services based on values.