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

the calico-apiserver namespace frequently get stuck for a long time in terminating status when upgrading to enterprise #3439

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

gcosgrave
Copy link
Contributor

Description

The apiserver TigeraStatus error message Error creating / updating resource: secrets "tigera-apiserver-certs" is forbidden: unable to create new content in namespace calico-apiserver because it is being terminated identifies the problem as the certs secret is called "calico-apiserver-certs" when it is in the "calico-apiserver" namespace, and "tigera-apiserver-certs" when in the "tigera-apiserver" namespace

apiVersion: operator.tigera.io/v1
kind: TigeraStatus
metadata:
    creationTimestamp: "2024-07-18T11:15:59Z"
    generation: 1
    name: apiserver
    resourceVersion: "2010"
    uid: fcdb9846-3772-4684-afe3-db458486608b
spec: {}
status:
    conditions:
        - lastTransitionTime: "2024-07-18T11:18:06Z"
          message: 'Error creating / updating resource: secrets "tigera-apiserver-certs" is forbidden: unable to create new content in namespace calico-apiserver because it is being terminated'
          observedGeneration: 1
          reason: ResourceUpdateError
          status: "True"
          type: Degraded
        - lastTransitionTime: "2024-07-18T11:17:56Z"
          observedGeneration: 1
          reason: Unknown
          status: "False"
          type: Available
        - lastTransitionTime: "2024-07-18T11:17:56Z"
          message: Deployment "tigera-system/tigera-apiserver" is not available (awaiting 2 replicas)
          observedGeneration: 1
          reason: ResourceNotReady
          status: "True"
          type: Progressing

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

…n terminating status when upgrading to enterprise
@@ -252,11 +252,7 @@ func (r *ReconcileAPIServer) Reconcile(ctx context.Context, request reconcile.Re
r.status.SetDegraded(operatorv1.ResourceReadError, "Error querying installation", err, reqLogger)
return reconcile.Result{}, err
}
if variant == "" {
Copy link
Member

@caseydavenport caseydavenport Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmjd @gcosgrave I think we still do need this check to handle the tiniest of race conditions.

If a user creates an Installation with no variant, we want to wait for the Installation / core controller to default it before we continue. It should only add a second of delay.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree. To be specific the check can be changed to if installationSpec.Variant == ""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@tmjd tmjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I think the unset variant message could use an update.

pkg/controller/apiserver/apiserver_controller.go Outdated Show resolved Hide resolved
@tmjd tmjd merged commit b63136c into tigera:master Jul 22, 2024
5 checks passed
gcosgrave added a commit to gcosgrave/operator that referenced this pull request Jul 22, 2024
…n terminating status when upgrading to enterprise (tigera#3439)

* the calico-apiserver namespace frequently get stuck for a long time in terminating status when upgrading to enterprise

* remove all references to status.variant

* update the not-ready message

(cherry picked from commit b63136c)
gcosgrave added a commit to gcosgrave/operator that referenced this pull request Jul 22, 2024
…n terminating status when upgrading to enterprise (tigera#3439)

* the calico-apiserver namespace frequently get stuck for a long time in terminating status when upgrading to enterprise

* remove all references to status.variant

* update the not-ready message

(cherry picked from commit b63136c)
caseydavenport pushed a commit that referenced this pull request Jul 22, 2024
…n terminating status when upgrading to enterprise (#3439) (#3444)

* the calico-apiserver namespace frequently get stuck for a long time in terminating status when upgrading to enterprise

* remove all references to status.variant

* update the not-ready message

(cherry picked from commit b63136c)
gcosgrave added a commit to gcosgrave/operator that referenced this pull request Jul 23, 2024
…n terminating status when upgrading to enterprise (tigera#3439)

* the calico-apiserver namespace frequently get stuck for a long time in terminating status when upgrading to enterprise

* remove all references to status.variant

* update the not-ready message

(cherry picked from commit b63136c)
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants