-
Notifications
You must be signed in to change notification settings - Fork 58
feat(softtainter): expose node classification metrics #977
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| annotations: | ||
| include.release.openshift.io/self-managed-high-availability: "true" | ||
| include.release.openshift.io/single-node-developer: "true" | ||
| service.beta.openshift.io/serving-cert-secret-name: softtainter-serving-cert | ||
| exclude.release.openshift.io/internal-openshift-hosted: "true" | ||
| labels: | ||
| app: softtainer | ||
| name: softtainter-metrics | ||
| namespace: openshift-kube-descheduler-operator | ||
| spec: | ||
| ports: | ||
| - name: https | ||
| port: 8443 | ||
| protocol: TCP | ||
| targetPort: 8443 | ||
| selector: | ||
| app: softtainer | ||
| sessionAffinity: None | ||
| type: ClusterIP |
25 changes: 25 additions & 0 deletions
25
bindata/assets/kube-descheduler/softtainterservicemonitor.yaml
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,25 @@ | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: ServiceMonitor | ||
| metadata: | ||
| name: softtainter | ||
| namespace: openshift-kube-descheduler-operator | ||
| annotations: | ||
| exclude.release.openshift.io/internal-openshift-hosted: "true" | ||
| include.release.openshift.io/self-managed-high-availability: "true" | ||
| include.release.openshift.io/single-node-developer: "true" | ||
| spec: | ||
| endpoints: | ||
| - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
| interval: 30s | ||
| path: /metrics | ||
| port: https | ||
| scheme: https | ||
| tlsConfig: | ||
| caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt | ||
| serverName: softtainter-metrics.openshift-kube-descheduler-operator.svc | ||
| namespaceSelector: | ||
| matchNames: | ||
| - openshift-kube-descheduler-operator | ||
| selector: | ||
| matchLabels: | ||
| app: softtainer |
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
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.
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 suggest to use a different port number since 443 suffix resembles an apiserver. We have 10258 for the descheduler as 10259 is used for the scheduler. There's 60000 for the operator. We could go with 60001 for the moment?
Another way is to expose the metrics through descheduler as a carry patch. In which case there's no need for the extra configuration.
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.
Question is how this will evolve if/when the soft-tainter logic is moved to the descheduler repository. Also, given the descheduler is the source of truth about the classification it's more natural to expose the metrics within.
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.
With the current approach the soft-tainter can run very often and thus provide almost an up-to-date classification of nodes. Which on the other hand does not need to correspond to what descheduler sees since the time of running the LowNodeUtilization plugin may vary depending on how quickly the plugin works.
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.
The
softtainteris running with the same periodicity of theLowNodeUtilizationplugin, but not in sync being two fully independent pods. If the interval is small enough, we can assume for simplicity that the observations about node classifications are consistent. This is the same assumption we are taking when applying the soft-taints to nodes.The descheduler classification is the source of truth for evictions, while the softtainer ones is the source of truth for the soft taints.
I think that the choice is more about the process to push it to upstream:
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.
please see kubernetes-sigs/descheduler#1777
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.
and openshift/descheduler#293