-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Labels
Description
Bug report
When a CRD installed with for kind "Deployment", Krane will be unable to deploy those resources if the scoping is different on the CRD. It will check the state of the wrong resource and in the wrong scope, cluster instead of namespace.
Expected behavior: deployment to succeed.
Actual behavior: Krane constantly checks if deployment is succeeded but eventually times out.
Version(s) affected: probably all versions.
Steps to Reproduce
- Start a new KinD cluster.
- Deploy the CRD in the collapsible below.
kubectl create ns example.DEBUG=1 bundle exec exe/krane deploy example kind-krane -f krane-manifest.yaml --global-timeout=1m.- Krane does deploy the resource but will be unable to check the status.
In debug mode you can see that it uses the wrong command to get the resource status:
kubectl get Deployment --chunk-size=0 --context=kind-kind-krane --output=json --request-timeout=30
CRD Deployment
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: deployments.stable.example.com
spec:
group: stable.example.com
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
test:
type: string
scope: Cluster
names:
plural: deployments
singular: deployment
kind: DeploymentDeployment
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
deploy: example
template:
metadata:
labels:
deploy: example
spec:
containers:
- name: nginx
image: nginxRelated to:
Reactions are currently unavailable