elastic / elasticsearch-k8s-metrics-adapter

An implementation of the Kubernetes Custom Metrics API for Elasticsearch
Apache License 2.0
5 stars 17 forks source link

Add sync wave annotation on the API services #123

Closed thbkrkr closed 1 month ago

thbkrkr commented 1 month ago

This adds a sync wave annotation on the API services to create them after the deployment.

The build corresponding to the merge of #118 to main fails:

waiting for healthy state of apiregistration.k8s.io/APIService/v1beta1.custom.metrics.k8s.io and 1 more resources

My understanding is that the sync is stuck because API services are not healthy because endpoints have no addresses, because there is no yet pods.

> k -n elastic-agent describe apiservice v1beta2.custom.metrics.k8s.io | grep -A10 Status
Status:
  Conditions:
    Last Transition Time:  2024-09-03T09:01:22Z
    Message:               endpoints for service/elasticsearch-metrics-apiserver in "elastic-agent" have no addresses with port name "https"
    Reason:                MissingEndpoints
    Status:                False
    Type:                  Available
Events:                    <none>

Verified in mydev env.