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

Valid CRs statuses should be set when KIM's operations succeed or fail #193

Closed
Tracked by #112
Disper opened this issue Apr 26, 2024 · 6 comments
Closed
Tracked by #112
Assignees

Comments

@Disper
Copy link
Member

Disper commented Apr 26, 2024

Proposed solution for Runtime CR:

Following Statuses will represent current state of provisioned Kyma runtime:

  • "Creating" - Kyma runtime is in progress of creation
  • "Ready" - Runtime is ready to use
  • "Error" - There was an error during Runtime operation, Runtime cannot be used
  • "Processing" - Kyma runtime is in progress of update,
  • "Deleting" - Kyma Runtime is being deleted

Following conditions will be used to describe processing steps for Runtime CR

  • "Provisioned" - Gardener Shoot CR for Runtime is exists and is reconciled without errors.
  • "KubeconfigReady" - Kubeconfig data is loaded into the dedicated seecret
  • "Configured" - Kyma Runtime is configured: correct cluster Role bindings are created for cluster administrators

For each condition can be in following reasons may occur:

  • Provisioned:

    • Initialised
    • Pending
    • ShootCreationCompleted
    • Processing
    • ProcessingCompleted
  • Configured

    • ConfigurationStarted
    • ConfigurationCompleted
@tobiscr
Copy link
Contributor

tobiscr commented Jun 18, 2024

Just as proposal:

could we stay with the status closer to the common Pod phases in K8s (e.g. https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase)?

Below a mapping between the initially suggested states and how they could be aligned with Pod phases:

Suggested runtime status Proposed status (=common pod phase) Comment
Creating Pending Runtime currently processed
Ready Running Runtime is provisioned and running
Error Failed Runtime could not be provisioned
Processing Pending Runtime currently processed
Deleting Terminating Terminating is not an official phase of a K8s pod but used by kubectl and it's meaningful to have a clear indication when a Runtime is on the way to be deleted

@koala7659
Copy link
Contributor

Agree with one exception. We think that still "Ready" is better word than "Running" since we are preparing Runtime to be used by its users.

Final table:

Suggested runtime status Proposed status (=common pod phase) Comment
Creating Pending Runtime currently processed
Ready Ready Runtime is provisioned and ready to use
Error Failed Runtime could not be provisioned
Processing Pending Runtime currently processed
Deleting Terminating Terminating is not an official phase of a K8s pod but used by kubectl and it's meaningful to have a clear indication when a Runtime is on the way to be deleted

@PK85
Copy link

PK85 commented Jun 19, 2024

@Disper please provide CR yaml examples with those new status and values

@koala7659
Copy link
Contributor

koala7659 commented Jun 24, 2024

Cluster is pending:

  status:
    conditions:
    - lastTransitionTime: "2024-06-24T07:34:30Z"
      message: Shoot creation in progress
      reason: Pending
      status: Unknown
      type: Provisioned
    state: Pending

Cluster is ready to use:

  status:
    conditions:
    - lastTransitionTime: "2024-06-24T07:45:48Z"
      message: Shoot creation completed
      reason: ShootCreationCompleted
      status: "True"
      type: Provisioned
    state: Ready

Cluster provisioning failed:

  status:
    conditions:
    - lastTransitionTime: "2024-06-24T07:45:48Z"
      message: Gardener API create error
      reason: GardenerErr
      status: "False"
      type: Provisioned
    state: Failed

@Disper
Copy link
Member Author

Disper commented Jun 24, 2024

@PK85 I've sent you some Runtime CRs examples via Slack

@tobiscr
Copy link
Contributor

tobiscr commented Jul 25, 2024

Implemented by @koala7659 - please create sub-issue if anything is missing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants