-
Notifications
You must be signed in to change notification settings - Fork 56
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
Upgrade flux-operator to 0.9.0 #362
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ annotations: | |
- name: Upstream Project | ||
url: https://github.com/controlplaneio-fluxcd/flux-operator | ||
apiVersion: v2 | ||
appVersion: v0.6.0 | ||
appVersion: v0.9.0 | ||
description: 'A Helm chart for deploying the Flux Operator. ' | ||
home: https://github.com/controlplaneio-fluxcd | ||
icon: https://raw.githubusercontent.com/cncf/artwork/main/projects/flux/icon/color/flux-icon-color.png | ||
|
@@ -18,13 +18,11 @@ keywords: | |
- gitops | ||
kubeVersion: '>=1.22.0-0' | ||
maintainers: | ||
- email: [email protected] | ||
name: Stefan Prodan | ||
- name: Soule Ba | ||
url: [email protected] | ||
- email: [email protected] | ||
name: ControlPlane Flux Team | ||
name: flux-operator | ||
sources: | ||
- https://github.com/controlplaneio-fluxcd/flux-operator | ||
- https://github.com/controlplaneio-fluxcd/charts | ||
type: application | ||
version: 0.6.0 | ||
version: 0.9.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- if .Values.serviceMonitor.create }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "flux-operator.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "flux-operator.labels" . | nindent 4 }} | ||
{{- with .Values.commonLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.serviceMonitor.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.commonAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace | quote }} | ||
selector: | ||
matchLabels: | ||
{{- include "flux-operator.selectorLabels" . | nindent 6 }} | ||
endpoints: | ||
- targetPort: 8080 | ||
path: /metrics | ||
interval: {{ .Values.serviceMonitor.interval }} | ||
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} | ||
Comment on lines
+19
to
+30
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. 🛠️ Refactor suggestion LGTM: Well-configured ServiceMonitor specification with a minor suggestion. The ServiceMonitor specification is correctly structured and uses appropriate templating for flexibility and consistency. The endpoints configuration allows for customization of scraping parameters, which is excellent. Consider making the metrics path configurable by using a Helm value instead of hardcoding it. This would provide more flexibility for users who might want to change the metrics endpoint. For example: path: {{ .Values.serviceMonitor.metricsPath | default "/metrics" }} Don't forget to update the |
||
{{- end }} |
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.
💡 Codebase verification
Potential Missing Tests for Sharding Feature
It appears that there are no existing tests specifically targeting the new
sharding
field incrds.yaml
. To ensure the reliability and correctness of the sharding configuration, it's recommended to implement comprehensive tests covering various shard setups and edge cases.packages/system/fluxcd-operator/charts/flux-operator/templates/crds.yaml
(lines 218-233)🔗 Analysis chain
LGTM. Ensure thorough testing of the new sharding feature.
The addition of the
sharding
field introduces a powerful sharding capability to the Flux operator. Thekey
field allows customization of the label key used for sharding, while the requiredshards
field ensures a complete sharding configuration.This feature could significantly impact how resources are distributed and managed. Please ensure thorough testing of the sharding feature, including edge cases and various shard configurations. Consider adding integration tests specifically for this feature. Run the following command to check for any existing tests related to sharding:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 33661