-
Notifications
You must be signed in to change notification settings - Fork 464
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
Add missing scale subresource status in order to use an HPA resource over an OpenTelemetryCollector CR #775
Comments
@jpkrohling I would be available to contribute a PR for this issue. Thank you in advance. |
It's yours! |
@secat could you please explain your use-case and how this feature is different to #746 which added Could you please also explain how the |
@pavolloffay as described in the note in the main description of this issue, the current implementation in #746 doesn't fulfill our needs since it creates a We want to scale short/medium term based on We have a meta controller that creates the Also short/medium term we want to use a |
thanks for the explanation @secat. If you could share your HPA configuration ( |
@pavolloffay here is an example of my current HPA apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: "2022-03-22T11:11:56Z"
labels:
app.kubernetes.io/component: collector
app.kubernetes.io/instance: tracingcollectorendpoint-collector-857851ca
app.kubernetes.io/managed-by: tracing-operator
app.kubernetes.io/name: tce-scatudal-local-lab
app.kubernetes.io/part-of: tracingcollectorendpoint
name: tracingcollectorendpoint-collector-857851ca
namespace: scatudal-local-lab
ownerReferences:
- apiVersion: tracing.observability.harbour.ubisoft.com/v1alpha1
blockOwnerDeletion: true
controller: true
kind: TracingCollectorEndpoint
name: tce-scatudal-local-lab
uid: c94e65b9-fb7c-420e-94c2-50f7dfd5e0e3
resourceVersion: "266206"
uid: dcc685bd-56e2-4a22-a0e4-cfb8a0bc9c2a
spec:
maxReplicas: 10
metrics:
- resource:
name: memory
target:
averageUtilization: 70
type: Utilization
type: Resource
- resource:
name: cpu
target:
averageUtilization: 70
type: Utilization
type: Resource
minReplicas: 1
scaleTargetRef:
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
name: tracingcollectorendpoint-collector-857851ca
status:
conditions:
- lastTransitionTime: "2022-03-22T11:12:11Z"
message: the HPA controller was able to get the target's current scale
reason: SucceededGetScale
status: "True"
type: AbleToScale
- lastTransitionTime: "2022-03-22T11:12:11Z"
message: the HPA target's scale is missing a selector
reason: InvalidSelector
status: "False"
type: ScalingActive
currentMetrics: null
currentReplicas: 1
desiredReplicas: 0
|
Notes about autoscaling API deprecation:
|
@pavolloffay thank you 🙏 for the heads up! At least the |
The
OpenTelemetryCollector
has a configuration field namedreplicas
(see openTelemetryCollector.spec.replicas). However it lacks some status info in order to configure an HPA on a it (see scale subresource documentation) using the definedscale
subresource in theOpenTelemetryCollector
CRD.Suggestion
I suggest to update the
OpenTelemetryCollector
CRD status with:The text was updated successfully, but these errors were encountered: