Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.
This repository was archived by the owner on Jun 22, 2023. It is now read-only.

cannot create deployments via automation when BYO cluster is used #18

Open
@kasturinarra

Description

@kasturinarra

What version of Go are you using (go version)?

$ go version

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What version of oc are you using (oc version)?

$ oc version

What did you run?

When the test to add BYO cluster is run i see that deployment fails to get created with the error below, i think we will have to wait for the resource discovery to happen before proceeding to create a deployment.

INFO Oct 6 16:04:02.056: Error running /bin/kubectl create deployment e2e-dep-m7qxaup6 -n e2e-ns-kcp-syncer-htzrr --image gcr.io/kuar-demo/kuard-amd64:blue --server=:e2e-test-kcp-syncer-45bwt:
error: failed to create deployment: the server could not find the requested resource (post deployments.apps)

Any logs?

INFO Oct 6 16:03:32.051: Creating workspace "e2e-test-kcp-syncer-45bwt"
INFO Oct 6 16:03:33.780: Workspace "e2e-test-kcp-syncer-45bwt" has been fully provisioned.
INFO Oct 6 16:03:33.780: Creating namespace "e2e-ns-kcp-syncer-htzrr"
STEP: # Create workload sync and generate syncer resources manifests in current workspace
STEP: # Apply syncer resources on pcluster and wait for synctarget become ready
namespace/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
serviceaccount/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
secret/kcp-syncer-mysyncer-32ovpysu-u3s7jto2-token created
clusterrole.rbac.authorization.k8s.io/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
clusterrolebinding.rbac.authorization.k8s.io/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
secret/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
Warning: would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (container "kcp-syncer" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "kcp-syncer" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "kcp-syncer" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "kcp-syncer" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
deployment.apps/kcp-syncer-mysyncer-32ovpysu-u3s7jto2 created
INFO Oct 6 16:03:58.152: SyncTarget/mysyncer-32ovpysu ready condition is True
INFO Oct 6 16:04:00.512: schemaAttributes are [NAME LOCATION READY SYNCED API RESOURCES KEY AGE]
INFO Oct 6 16:04:00.512: attributeValues are [mysyncer-32ovpysu mysyncer-32ovpysu True byNvoiar7aivEK46FX4YcRUKVOqjTwGJzDpSFt 23s]
STEP: # Creating workload using the BYO compute should work well
INFO Oct 6 16:04:02.056: Error running /bin/kubectl create deployment e2e-dep-m7qxaup6 -n e2e-ns-kcp-syncer-htzrr --image gcr.io/kuar-demo/kuard-amd64:blue --server=:e2e-test-kcp-syncer-45bwt:
error: failed to create deployment: the server could not find the requested resource (post deployments.apps)
error: failed to create deployment: the server could not find the requested resource (post deployments.apps)
INFO Oct 6 16:04:04.946: Error running /bin/kubectl delete deployment e2e-dep-m7qxaup6 -n e2e-ns-kcp-syncer-htzrr --server=/clusters/root:users:lw:ao:rh-sso-knarrakcp:e2e-test-kcp-syncer-45bwt:
error: the server doesn't have a resource type "deployment"
error: the server doesn't have a resource type "deployment"
INFO Oct 6 16:04:08.133: Error running /bin/kubectl delete -f /tmp/e2e-test-kcp-syncer-45bwt.mysyncer-32ovpysu.yaml --kubeconfig=/home/knarra/Downloads/kubeconfig_411:
namespace "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
serviceaccount "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
clusterrole.rbac.authorization.k8s.io "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
clusterrolebinding.rbac.authorization.k8s.io "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
secret "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
deployment.apps "kcp-syncer-mysyncer-32ovpysu-u3s7jto2" deleted
Error from server (NotFound): error when deleting "/tmp/e2e-test-kcp-syncer-45bwt.mysyncer-32ovpysu.yaml": secrets "kcp-syncer-mysyncer-32ovpysu-u3s7jto2-token" not found

What did you expect to see?

wait for the discovery to happen before proceeding with creating the deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions