{"id":197,"date":"2025-12-28T16:28:00","date_gmt":"2025-12-28T16:28:00","guid":{"rendered":"https:\/\/blog.simulakrum.vpndns.org\/?p=197"},"modified":"2025-12-28T16:28:00","modified_gmt":"2025-12-28T16:28:00","slug":"flaggers-in-order-of-disappearance-issue","status":"publish","type":"post","link":"https:\/\/blog.simulakrum.vpndns.org\/?p=197","title":{"rendered":"Flagger&#8217;s &#8220;in order of disappearance&#8221; issue"},"content":{"rendered":"\n<p>Installing Flagger via Helm should be straightforward:<br><a href=\"https:\/\/docs.flagger.app\/install\/flagger-install-on-kubernetes\">https:\/\/docs.flagger.app\/install\/flagger-install-on-kubernetes<\/a><\/p>\n\n\n\n<p>A problem, however, appears after installing the CRDs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/fluxcd\/flagger\/main\/artifacts\/flagger\/crd.yaml<\/code><\/pre>\n\n\n\n<p>and then moving on to install<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>helm upgrade -i flagger flagger\/flagger \\\n--namespace=istio-system \\\n--set crd.create=false \\\n--set meshProvider=istio \\\n--set metricsServer=http:\/\/prometheus:9090<\/code><\/pre>\n\n\n\n<p>yields a problem:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Error: failed to install CRD crds\/crd.yaml: conflict occurred while applying object \/canaries.flagger.app apiextensions.k8s.io\/v1, Kind=CustomResourceDefinition: Apply failed with 1 conflict: conflict with \"kubectl-client-side-apply\" using apiextensions.k8s.io\/v1: .spec.versions<\/code><\/pre>\n\n\n\n<p>If you try to deinstall the CRD&#8217;s, and install it as part of the Helm installation, as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>helm upgrade -i flagger flagger\/flagger --namespace=istio-system --set crd.create=true --set meshProvider=istio --set metricsServer=http:\/\/prometheus:9090<\/code><\/pre>\n\n\n\n<p>the issue then becomes the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Error: unable to continue with install: CustomResourceDefinition \"canaries.flagger.app\" in namespace \"\" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key \"app.kubernetes.io\/managed-by\": must be set to \"Helm\"; annotation validation error: missing key \"meta.helm.sh\/release-name\": must be set to \"flagger\"; annotation validation error: missing key \"meta.helm.sh\/release-namespace\": must be set to \"istio-system\"<\/code><\/pre>\n\n\n\n<p>Also, the <a href=\"https:\/\/artifacthub.io\/packages\/helm\/flagger\/flagger\">Helm Chart page for Flagger<\/a> explains that crd.create should be set to true only for Helm v2.<br>The solution is to install first the Helm Chart, and then add the CRDs &#8211; swap the steps 2. and 3. and it should all work, with a few non-fatal warnings: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>helm upgrade -i flagger flagger\/flagger --namespace=istio-system --set crd.create=false --set meshProvider=istio --set metricsServer=http:\/\/prometheus:9090 --version 1.42.0\nRelease \"flagger\" does not exist. Installing it now.\nNAME: flagger\nLAST DEPLOYED: Sun Dec 28 16:43:34 2025\nNAMESPACE: istio-system\nSTATUS: deployed\nREVISION: 1\nDESCRIPTION: Install complete\nTEST SUITE: None\nNOTES:\nFlagger installed<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl apply -f https:\/\/raw.githubusercontent.com\/fluxcd\/flagger\/main\/artifacts\/flagger\/crd.yaml\nWarning: resource customresourcedefinitions\/canaries.flagger.app is missing the kubectl.kubernetes.io\/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.\ncustomresourcedefinition.apiextensions.k8s.io\/canaries.flagger.app configured\nWarning: resource customresourcedefinitions\/metrictemplates.flagger.app is missing the kubectl.kubernetes.io\/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.\ncustomresourcedefinition.apiextensions.k8s.io\/metrictemplates.flagger.app configured\nWarning: resource customresourcedefinitions\/alertproviders.flagger.app is missing the kubectl.kubernetes.io\/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.\ncustomresourcedefinition.apiextensions.k8s.io\/alertproviders.flagger.app configured<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Flagger via Helm should be straightforward:https:\/\/docs.flagger.app\/install\/flagger-install-on-kubernetes A problem, however, appears after installing the CRDs: and then moving on to install yields a problem: If you try to deinstall the CRD&#8217;s, and install it as part of the Helm installation, as: the issue then becomes the following: Also, the Helm Chart page for Flagger explains that crd.create should be set &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=197"}],"version-history":[{"count":1,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":198,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=\/wp\/v2\/posts\/197\/revisions\/198"}],"wp:attachment":[{"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.simulakrum.vpndns.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}