-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PDB and PodMonitor and fix some bugs (#85)
* Add PDB and PodMonitor and fix some bugs * Check if percentage * Check if percentage * Nit
- Loading branch information
1 parent
91510eb
commit 702edcc
Showing
14 changed files
with
100 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ maintainers: | |
- name: radu-catalina | ||
email: [email protected] | ||
|
||
version: 0.1.6 | ||
version: 0.1.7 | ||
appVersion: v1.4.2 |
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...client/templates/cluster-rolebinding.yaml → ...-client/templates/clusterrolebinding.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
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
19 changes: 19 additions & 0 deletions
19
charts/cluster-registry-client/templates/poddisruptionbudget.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,19 @@ | ||
{{- if .Values.podDisruptionBudget.enabled }} | ||
{{- $isPercentage := regexMatch "^[0-9]+%$" (.Values.podDisruptionBudget.minAvailable | quote) }} | ||
{{- if and (not $isPercentage) (le (.Values.replicaCount | int) (.Values.podDisruptionBudget.minAvailable | int)) }} | ||
{{- fail ".Values.replicaCount should be greater than .Values.podDisruptionBudget.minAvailable" }} | ||
{{- else }} | ||
apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
{{- include "cluster-registry-client.labels" . | nindent 4 }} | ||
name: {{ template "cluster-registry-client.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "cluster-registry-client.selectorLabels" . | nindent 6 }} | ||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} | ||
{{- end }} | ||
{{- end }} |
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,27 @@ | ||
{{- if .Values.podMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
labels: | ||
{{- include "cluster-registry-client.labels" . | nindent 4 }} | ||
{{- if .Values.podMonitor.extraLabels }} | ||
{{- toYaml .Values.podMonitor.extraLabels | nindent 4 }} | ||
{{- end }} | ||
name: cluster-registry-client | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
jobLabel: app | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
podMetricsEndpoints: | ||
- interval: 60s | ||
path: /metrics | ||
port: metrics | ||
- interval: 60s | ||
path: /metrics/extra | ||
port: metrics | ||
selector: | ||
matchLabels: | ||
{{- include "cluster-registry-client.selectorLabels" . | nindent 6 }} | ||
{{- end }} |
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
2 changes: 1 addition & 1 deletion
2
charts/cluster-registry-client/templates/rolebinding-leader-election.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
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