Created
March 10, 2021 16:46
-
-
Save chaliy/aa6064eb72c7a4b4916bb980828a14fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flux2 install for Kubernetes v1.15.0 | |
flux install --export --watch-all-namespaces=false -n {{inputs.parameters.namespace}} | \ | |
yq4 e 'select(.kind == "CustomResourceDefinition").apiVersion = "apiextensions.k8s.io/v1beta1"' - | \ | |
yq4 e 'select(.kind == "CustomResourceDefinition").spec.additionalPrinterColumns = select(.kind == "CustomResourceDefinition").spec.versions[0].additionalPrinterColumns' - | \ | |
yq4 e 'del(select(.kind == "CustomResourceDefinition").spec.versions[].additionalPrinterColumns)' - | \ | |
yq4 e 'select(.kind == "CustomResourceDefinition").spec.validation = select(.kind == "CustomResourceDefinition").spec.versions[0].schema' - | \ | |
yq4 e 'del(select(.kind == "CustomResourceDefinition").spec.versions[0].schema)' - | \ | |
yq4 e 'select(.kind == "CustomResourceDefinition").spec.subresources = select(.kind == "CustomResourceDefinition").spec.versions[0].subresources' - | \ | |
yq4 e 'del(select(.kind == "CustomResourceDefinition").spec.versions[0].subresources)' - | \ | |
yq4 e 'del(.. | select(has("default")).default)' - | \ | |
sed 's/jsonPath/JSONPath/' | \ | |
sed 's/^{}//' | kubectl apply -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment