qbec
qbec copied to clipboard
fix example deployment
This PR fixes two errors in example app:
First is missing selector for the Deployment:
error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false
Second is missing name for the Job (replaces generateName):
error: from tj-: cannot use generate name with apply
Are you using qbec show envKey | kubectl apply -f -? qbec apply should work with generateName
Yes, I'm going to use qbec with Argo CD, example setup: https://github.com/argoproj/argo-cd/issues/2930#issuecomment-686048925
I understand the changes to the deployment object but why doesn't generateName work? It is part of the k8s API spec and both kubectl and qbec honor it.
I think one of the unit tests relies on the object having a generated name which is why I cannot accept that particular change.
Happy to have you create a secondary test app under examples/ if you want to keep it tied to the qbec source tree
I don't know, may be because I was testing it on newest 1.19
Kubectl has a defect with first apply on generateName. I'll dig up the details. Kubectl create is recommended
Possibly this https://github.com/kubernetes/kubernetes/issues/44501
Codecov Report
Merging #151 (fb6b612) into master (b72657c) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #151 +/- ##
=======================================
Coverage 73.41% 73.41%
=======================================
Files 51 51
Lines 4300 4300
=======================================
Hits 3157 3157
Misses 966 966
Partials 177 177
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b72657c...fb6b612. Read the comment docs.