Skip to content
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

WIP EndpointSlices discovery #226

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions charts/cryostat/templates/cryostat_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ spec:
value: {{ include "cryostat.commaSepList" (list .portNumbers 9091 .builtInPortNumbersDisabled) }}
{{- end }}
{{- end }}
{{- if .Values.core.discovery.kubernetes2.enabled }}
- name: CRYOSTAT_DISCOVERY_KUBERNETES2_ENABLED
value: "true"
{{- with .Values.core.discovery.kubernetes }}
- name: CRYOSTAT_DISCOVERY_KUBERNETES_NAMESPACES
value: {{ include "cryostat.commaSepList" (list .namespaces $.Release.Namespace .installNamespaceDisabled) }}
- name: CRYOSTAT_DISCOVERY_KUBERNETES_PORT_NAMES
value: {{ include "cryostat.commaSepList" (list .portNames "jfr-jmx" .builtInPortNamesDisabled) }}
- name: CRYOSTAT_DISCOVERY_KUBERNETES_PORT_NUMBERS
value: {{ include "cryostat.commaSepList" (list .portNumbers 9091 .builtInPortNumbersDisabled) }}
{{- end }}
{{- end }}
ports:
- containerPort: 8181
protocol: TCP
Expand Down
10 changes: 9 additions & 1 deletion charts/cryostat/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ rules:
- get
- list
- watch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -50,7 +58,7 @@ rules:
{{- end -}}
{{- end -}}

{{- if and .Values.rbac.create .Values.core.discovery.kubernetes.enabled -}}
{{- if and .Values.rbac.create (or .Values.core.discovery.kubernetes.enabled .Values.core.discovery.kubernetes2.enabled) -}}
{{- $watchNs := compact (default list .Values.core.discovery.kubernetes.namespaces) | uniq -}}
{{- if and (not $watchNs) (not .Values.core.discovery.kubernetes.installNamespaceDisabled) -}}
{{- $watchNs = list .Release.Namespace -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/cryostat/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ subjects:
{{- end -}}
{{- end -}}

{{- if and .Values.rbac.create .Values.core.discovery.kubernetes.enabled -}}
{{- if and .Values.rbac.create (or .Values.core.discovery.kubernetes.enabled .Values.core.discovery.kubernetes2.enabled) -}}
{{- $watchNs := compact (default list .Values.core.discovery.kubernetes.namespaces) | uniq -}}
{{- if and (not $watchNs) (not .Values.core.discovery.kubernetes.installNamespaceDisabled) -}}
{{- $watchNs = list .Release.Namespace -}}
Expand Down
3 changes: 3 additions & 0 deletions charts/cryostat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ core:
builtInPortNumbersDisabled: false
## @param core.discovery.kubernetes.portNumbers [array] List of port numbers that the Cryostat application should look for in order to consider a target as JMX connectable
portNumbers: []
kubernetes2:
## @param core.discovery.kubernetes2.enabled Enables Kubernetes API discovery mechanism
enabled: false

## @section Report Generator Deployment
## @extra reports Configuration for the Reports Generator deployment
Expand Down
Loading