-
Notifications
You must be signed in to change notification settings - Fork 271
Adds fleet-event-monitor #4808
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
Closed
Closed
Adds fleet-event-monitor #4808
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,9 @@ | ||
| apiVersion: v2 | ||
| name: fleet-event-monitor | ||
| version: 0.0.0 | ||
| appVersion: 0.0.0 | ||
| description: Fleet Event Monitor - Read-only monitoring for Fleet controllers | ||
| icon: https://charts.rancher.io/assets/logos/fleet.svg | ||
| annotations: | ||
| catalog.cattle.io/namespace: cattle-fleet-system | ||
| catalog.cattle.io/kube-version: '>= 1.28.0-0 < 1.35.0-0' |
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,34 @@ | ||
| {{- define "fleet-event-monitor.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{- define "fleet-event-monitor.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{- define "fleet-event-monitor.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{- define "fleet-event-monitor.labels" -}} | ||
| helm.sh/chart: {{ include "fleet-event-monitor.chart" . }} | ||
| {{ include "fleet-event-monitor.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{- define "fleet-event-monitor.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "fleet-event-monitor.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- 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,245 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: fleet-event-monitor{{- if .Values.shardID }}-shard-{{ .Values.shardID }}{{- end }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "fleet-event-monitor.labels" . | nindent 4 }} | ||
| {{- if .Values.shardID }} | ||
| fleet.cattle.io/shard-id: {{ .Values.shardID }} | ||
| {{- end }} | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| {{- include "fleet-event-monitor.selectorLabels" . | nindent 6 }} | ||
| {{- if .Values.shardID }} | ||
| fleet.cattle.io/shard-id: {{ .Values.shardID }} | ||
| {{- end }} | ||
| template: | ||
| metadata: | ||
| labels: | ||
| {{- include "fleet-event-monitor.selectorLabels" . | nindent 8 }} | ||
| {{- if .Values.shardID }} | ||
| fleet.cattle.io/shard-id: {{ .Values.shardID }} | ||
| {{- end }} | ||
| spec: | ||
| serviceAccountName: fleet-event-monitor | ||
| {{- with .Values.securityContext }} | ||
| securityContext: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| containers: | ||
| - name: fleet-event-monitor | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
| imagePullPolicy: {{ .Values.image.imagePullPolicy }} | ||
| command: | ||
| - fleeteventmonitor | ||
| {{- if .Values.shardID }} | ||
| - --shard-id={{ .Values.shardID }} | ||
| {{- end }} | ||
| {{- if .Values.debug }} | ||
| - --debug | ||
| - --debug-level={{ .Values.debugLevel }} | ||
| {{- end }} | ||
| env: | ||
| - name: NAMESPACE | ||
| value: {{ .Values.namespace | quote }} | ||
| - name: ENABLE_BUNDLE_EVENT_MONITOR | ||
| value: {{ .Values.controllers.bundle | quote }} | ||
| - name: ENABLE_BUNDLEDEPLOYMENT_EVENT_MONITOR | ||
| value: {{ .Values.controllers.bundledeployment | quote }} | ||
| - name: ENABLE_CLUSTER_EVENT_MONITOR | ||
| value: {{ .Values.controllers.cluster | quote }} | ||
| - name: ENABLE_GITREPO_EVENT_MONITOR | ||
| value: {{ .Values.controllers.gitrepo | quote }} | ||
| - name: ENABLE_HELMOP_EVENT_MONITOR | ||
| value: {{ .Values.controllers.helmop | quote }} | ||
| - name: BUNDLE_RECONCILER_WORKERS | ||
| value: {{ .Values.workers.bundle | quote }} | ||
| - name: BUNDLEDEPLOYMENT_RECONCILER_WORKERS | ||
| value: {{ .Values.workers.bundledeployment | quote }} | ||
| - name: CLUSTER_RECONCILER_WORKERS | ||
| value: {{ .Values.workers.cluster | quote }} | ||
| - name: GITREPO_RECONCILER_WORKERS | ||
| value: {{ .Values.workers.gitrepo | quote }} | ||
| - name: HELMOP_RECONCILER_WORKERS | ||
| value: {{ .Values.workers.helmop | quote }} | ||
| {{- if .Values.debug }} | ||
| - name: CATTLE_DEV_MODE | ||
| value: "true" | ||
| {{- end }} | ||
| - name: FLEET_LEADER_ELECTION_ENABLED | ||
| value: {{ .Values.leaderElection.enabled | quote }} | ||
| {{- if .Values.leaderElection.enabled }} | ||
| - name: CATTLE_ELECTION_LEASE_DURATION | ||
| value: {{ .Values.leaderElection.leaseDuration | quote }} | ||
| - name: CATTLE_ELECTION_RETRY_PERIOD | ||
| value: {{ .Values.leaderElection.retryPeriod | quote }} | ||
| - name: CATTLE_ELECTION_RENEW_DEADLINE | ||
| value: {{ .Values.leaderElection.renewDeadline | quote }} | ||
| {{- end }} | ||
| # Per-controller detailed logging flags | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_DETAILED | ||
| value: {{ .Values.logging.bundle.detailed | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLEDEPLOYMENT_DETAILED | ||
| value: {{ .Values.logging.bundleDeployment.detailed | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_DETAILED | ||
| value: {{ .Values.logging.cluster.detailed | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_DETAILED | ||
| value: {{ .Values.logging.gitRepo.detailed | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_DETAILED | ||
| value: {{ .Values.logging.helmOp.detailed | quote }} | ||
| # Bundle resource filters | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_RESOURCE_FILTER_NAMESPACE | ||
| value: {{ .Values.logging.bundle.resourceFilter.namespace | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_RESOURCE_FILTER_NAME | ||
| value: {{ .Values.logging.bundle.resourceFilter.name | quote }} | ||
| # Bundle event filters | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_GENERATION_CHANGE | ||
| value: {{ .Values.logging.bundle.eventFilters.generationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_STATUS_CHANGE | ||
| value: {{ .Values.logging.bundle.eventFilters.statusChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_ANNOTATION_CHANGE | ||
| value: {{ .Values.logging.bundle.eventFilters.annotationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_LABEL_CHANGE | ||
| value: {{ .Values.logging.bundle.eventFilters.labelChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_RESVER_CHANGE | ||
| value: {{ .Values.logging.bundle.eventFilters.resourceVersionChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_DELETION | ||
| value: {{ .Values.logging.bundle.eventFilters.deletion | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_NOT_FOUND | ||
| value: {{ .Values.logging.bundle.eventFilters.notFound | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_CREATE | ||
| value: {{ .Values.logging.bundle.eventFilters.create | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLE_EVENT_TRIGGERED_BY | ||
| value: {{ .Values.logging.bundle.eventFilters.triggeredBy | quote }} | ||
| # BundleDeployment resource filters | ||
| - name: FLEET_EVENT_MONITOR_BUNDLEDEPLOYMENT_RESOURCE_FILTER_NAMESPACE | ||
| value: {{ .Values.logging.bundleDeployment.resourceFilter.namespace | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BUNDLEDEPLOYMENT_RESOURCE_FILTER_NAME | ||
| value: {{ .Values.logging.bundleDeployment.resourceFilter.name | quote }} | ||
| # BundleDeployment event filters | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_GENERATION_CHANGE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.generationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_STATUS_CHANGE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.statusChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_ANNOTATION_CHANGE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.annotationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_LABEL_CHANGE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.labelChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_RESVER_CHANGE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.resourceVersionChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_DELETION | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.deletion | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_NOT_FOUND | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.notFound | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_CREATE | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.create | quote }} | ||
| - name: FLEET_EVENT_MONITOR_BD_EVENT_TRIGGERED_BY | ||
| value: {{ .Values.logging.bundleDeployment.eventFilters.triggeredBy | quote }} | ||
| # Cluster resource filters | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_RESOURCE_FILTER_NAMESPACE | ||
| value: {{ .Values.logging.cluster.resourceFilter.namespace | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_RESOURCE_FILTER_NAME | ||
| value: {{ .Values.logging.cluster.resourceFilter.name | quote }} | ||
| # Cluster event filters | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_GENERATION_CHANGE | ||
| value: {{ .Values.logging.cluster.eventFilters.generationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_STATUS_CHANGE | ||
| value: {{ .Values.logging.cluster.eventFilters.statusChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_ANNOTATION_CHANGE | ||
| value: {{ .Values.logging.cluster.eventFilters.annotationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_LABEL_CHANGE | ||
| value: {{ .Values.logging.cluster.eventFilters.labelChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_RESVER_CHANGE | ||
| value: {{ .Values.logging.cluster.eventFilters.resourceVersionChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_DELETION | ||
| value: {{ .Values.logging.cluster.eventFilters.deletion | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_NOT_FOUND | ||
| value: {{ .Values.logging.cluster.eventFilters.notFound | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_CREATE | ||
| value: {{ .Values.logging.cluster.eventFilters.create | quote }} | ||
| - name: FLEET_EVENT_MONITOR_CLUSTER_EVENT_TRIGGERED_BY | ||
| value: {{ .Values.logging.cluster.eventFilters.triggeredBy | quote }} | ||
| # GitRepo resource filters | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_RESOURCE_FILTER_NAMESPACE | ||
| value: {{ .Values.logging.gitRepo.resourceFilter.namespace | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_RESOURCE_FILTER_NAME | ||
| value: {{ .Values.logging.gitRepo.resourceFilter.name | quote }} | ||
| # GitRepo event filters | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_GENERATION_CHANGE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.generationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_STATUS_CHANGE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.statusChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_ANNOTATION_CHANGE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.annotationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_LABEL_CHANGE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.labelChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_RESVER_CHANGE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.resourceVersionChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_DELETION | ||
| value: {{ .Values.logging.gitRepo.eventFilters.deletion | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_NOT_FOUND | ||
| value: {{ .Values.logging.gitRepo.eventFilters.notFound | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_CREATE | ||
| value: {{ .Values.logging.gitRepo.eventFilters.create | quote }} | ||
| - name: FLEET_EVENT_MONITOR_GITREPO_EVENT_TRIGGERED_BY | ||
| value: {{ .Values.logging.gitRepo.eventFilters.triggeredBy | quote }} | ||
| # HelmOp resource filters | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_RESOURCE_FILTER_NAMESPACE | ||
| value: {{ .Values.logging.helmOp.resourceFilter.namespace | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_RESOURCE_FILTER_NAME | ||
| value: {{ .Values.logging.helmOp.resourceFilter.name | quote }} | ||
| # HelmOp event filters | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_GENERATION_CHANGE | ||
| value: {{ .Values.logging.helmOp.eventFilters.generationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_STATUS_CHANGE | ||
| value: {{ .Values.logging.helmOp.eventFilters.statusChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_ANNOTATION_CHANGE | ||
| value: {{ .Values.logging.helmOp.eventFilters.annotationChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_LABEL_CHANGE | ||
| value: {{ .Values.logging.helmOp.eventFilters.labelChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_RESVER_CHANGE | ||
| value: {{ .Values.logging.helmOp.eventFilters.resourceVersionChange | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_DELETION | ||
| value: {{ .Values.logging.helmOp.eventFilters.deletion | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_NOT_FOUND | ||
| value: {{ .Values.logging.helmOp.eventFilters.notFound | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_CREATE | ||
| value: {{ .Values.logging.helmOp.eventFilters.create | quote }} | ||
| - name: FLEET_EVENT_MONITOR_HELMOP_EVENT_TRIGGERED_BY | ||
| value: {{ .Values.logging.helmOp.eventFilters.triggeredBy | quote }} | ||
| # Summary configuration | ||
| - name: FLEET_EVENT_MONITOR_SUMMARY_INTERVAL | ||
| value: {{ .Values.logging.summary.interval | quote }} | ||
| - name: FLEET_EVENT_MONITOR_SUMMARY_RESET | ||
| value: {{ .Values.logging.summary.resetOnPrint | quote }} | ||
| {{- with .Values.extraEnv }} | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| readOnlyRootFilesystem: true | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| resources: | ||
| {{- toYaml .Values.resources | nindent 10 }} | ||
| volumeMounts: | ||
| - name: tmp | ||
| mountPath: /tmp | ||
| volumes: | ||
| - name: tmp | ||
| emptyDir: {} | ||
| {{- with .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.tolerations }} | ||
| tolerations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.priorityClassName }} | ||
| priorityClassName: {{ . }} | ||
| {{- end }} | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.