Open peppemanzi opened 1 year ago
I'll add another strange behaviour to this issue: I had the same error reported, but in my case no resources has been deleted, nor created or updated. Instead, mlp has logged the error, but the pipeline still finished with an OK status. This behaviour is wrong, I should have received from the pipeline a KO.
To give a bit of context, I've received this errors:
accumulating resources: accumulation err='accumulating resources from '../../configuration': '/home/vsts/work/1/s/configuration' must resolve to a file': recursed accumulation of path '/home/vsts/work/1/s/configuration': accumulating resources: accumulating resources from '<<name>>.cronjob.yml': MalformedYAMLError: yaml: line 31: did not find expected key in File: <<name>>.cronjob.yml
WARN: can't read input file at path /home/vsts/work/1/s/interpolated-files/kustomize-output.yaml
Due to an error in the syntax of a Cronjob YAML.
Hi guys, this problem just happened again to me and @ivanpasquariello. It's very bad behaviour to delete all k8s resources due to a configuration error.
Moreover, the Job finishes with the status "OK", so you don't know the pipeline has failed until you directly check on the cluster and, surprise, nothing is left on it.
Did you plan to fix it?
What version or versions you have tested?
v1.2.3
Which operating systems have you used?
What did you expect to happen?
Malformed YAML file does not implies that all the already existing resources in the target kubernetes namespace are deleted
What happened instead?
The folder provider as --filename parameter to the deploy command included a malformed yaml file. When the commad was executed all the existing resources in the target kubernetes namespace were deleted.
Environment: Azure DevOps pipelines, with bash script
Executed command:
mlp deploy --ensure-namespace=false --server $KUBE_URL --certificate-authority /tmp/kube-ca.pem --token $KUBE_TOKEN --deploy-type ${DEPLOY_TYPE} --force-deploy-when-no-semver=${FORCE_DEPLOY_WHEN_NO_SEMVER} -f ${DESTINATION_PATH} -n ${KUBE_NAMESPACE}
Obtained log:
file (before interpolation):
Code of Conduct