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

operator status is ready before it's able to accept admission webhooks. #957

Open
chirino opened this issue Jan 27, 2023 · 1 comment · May be fixed by #960
Open

operator status is ready before it's able to accept admission webhooks. #957

chirino opened this issue Jan 27, 2023 · 1 comment · May be fixed by #960
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chirino
Copy link

chirino commented Jan 27, 2023

I have a script that attempts to install the operator and create a db that looks something like:

    kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.10.0/install/crds.yaml
    kubectl apply -f https://raw.githubusercontent.com/cockroachdb/cockroach-operator/v2.10.0/install/operator.yaml
    kubectl wait --for=condition=Ready pods --all -n cockroach-operator-system --timeout=5m

    kubectl apply -k ./overlays/cockroach

Results in:

customresourcedefinition.apiextensions.k8s.io/crdbclusters.crdb.cockroachlabs.com created
namespace/cockroach-operator-system created
serviceaccount/cockroach-operator-sa created
clusterrole.rbac.authorization.k8s.io/cockroach-operator-role created
clusterrolebinding.rbac.authorization.k8s.io/cockroach-operator-rolebinding created
service/cockroach-operator-webhook-service created
deployment.apps/cockroach-operator-manager created
mutatingwebhookconfiguration.admissionregistration.k8s.io/cockroach-operator-mutating-webhook-configuration created
validatingwebhookconfiguration.admissionregistration.k8s.io/cockroach-operator-validating-webhook-configuration created
pod/cockroach-operator-manager-75fff59c94-j6qvp condition met
...
Error from server (InternalError): error when creating "./overlays/cockroach": Internal error occurred: failed calling webhook "mcrdbcluster.kb.io": failed to call webhook: Post "https://cockroach-operator-webhook-service.cockroach-operator-system.svc:443/mutate-crdb-cockroachlabs-com-v1alpha1-crdbcluster?timeout=10s": dial tcp 10.96.201.111:443: connect: connection

Is there a better way to wait for the operator to be ready before trying to create crdb resources?

@pseudomuto pseudomuto added enhancement New feature or request good first issue Good for newcomers labels Feb 21, 2023
chirino added a commit to chirino/cockroach-operator that referenced this issue Feb 22, 2023
chirino added a commit to chirino/cockroach-operator that referenced this issue Feb 22, 2023
@chirino chirino linked a pull request Feb 22, 2023 that will close this issue
@rgl
Copy link

rgl commented Jun 23, 2024

any news about this?

the following also didn't help:

while ! kubectl rollout status --namespace=cockroach-operator-system deployment/cockroach-operator-manager; do sleep 5; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants