Skip to content
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

[bug] Incorrect ManagedCluster status #813

Open
BROngineer opened this issue Dec 19, 2024 · 0 comments
Open

[bug] Incorrect ManagedCluster status #813

BROngineer opened this issue Dec 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BROngineer
Copy link
Contributor

Describe the bug
The cluster itself is healthy, but the services included in cluster spec and which were expected to be deployed in the cluster are not.

Deployed cluster with a set of services in spec:

apiVersion: hmc.mirantis.com/v1alpha1
kind: ManagedCluster
metadata:
  name: abortnikov-hmc-managed-01
  namespace: hmc-system
spec:
  template: aws-standalone-cp-0-0-4
  credential: aws-cluster-identity-cred
  services:
    - template: cert-manager-1-16-2
      name: managed-cert-manager
      namespace: cert-manager
    - template: external-secrets-0-11-0
      name: managed-external-secrets
      namespace: external-secrets

After a while it became "Ready":

> k get -nhmc-system managedclusters.hmc.mirantis.com                                                                                                                                                                         ⎈ kind-hmc-dev  16:00:09
NAME                        READY   STATUS
abortnikov-hmc-managed-01   True    ManagedCluster is ready

However, this is not true: only one of two services was deployed and due to missing configuration it never entered "ready" state (cert-manager pods continuously restarting due to missing CRDs).
This is reflected in the .status.services of the managed cluster, but the conditions are Ok:

> k get -nhmc-system managedclusters.hmc.mirantis.com abortnikov-hmc-managed-01 -oyaml
apiVersion: hmc.mirantis.com/v1alpha1
kind: ManagedCluster
metadata:
  name: abortnikov-hmc-managed-01
  namespace: hmc-system
...
status:
  conditions:
  ...
  - lastTransitionTime: "2024-12-18T19:38:08Z"
    message: ""
    reason: Succeeded
    status: "True"
    type: SveltosProfileReady
  - lastTransitionTime: "2024-12-18T19:34:54Z"
    message: ""
    reason: Succeeded
    status: "True"
    type: FetchServicesStatusSuccess
  ...
  services:
  - clusterName: abortnikov-hmc-managed-01
    clusterNamespace: hmc-system
    conditions:
    - lastTransitionTime: "2024-12-19T14:00:01Z"
      message: "failed post-install: 1 error occurred:\n\t* job managed-cert-manager-startupapicheck
        failed: BackoffLimitExceeded\n\n"
      reason: Provisioning
      status: "False"
      type: Helm

To Reproduce
Steps to reproduce the behavior:

  1. Deploy ManagedCluster with cert-manager service included. Due to CRDs' installation disabled by default in cert-manager Helm chart the service deployment will fail
  2. Wait until cluster becomes "Ready"

Expected behavior
It is expected that the ManagedCluster state should consider also state of services included to the spec.

@BROngineer BROngineer added the bug Something isn't working label Dec 19, 2024
@alex-shl alex-shl added this to k0rdent Jan 3, 2025
@alex-shl alex-shl moved this to Todo in k0rdent Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant