-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
post render plugin doesn't seem to work #103
Comments
ok so i got this to work by taking the original chart and including it, then putting kustomize and its patch yaml alongside it. basically i had to take the helm-guestbook chart (not this plugin chart), and add kustomize/patch files to it. is this example supposed to work by only referencing it? or are there prereq steps being assumed in it like I've done? |
I also add a few problems with this example:
I've done a few hacks to make this work, and behave a bit like flux: In data:
configManagementPlugins: |
- name: kustomized-helm
init:
command: ["/bin/sh", "-c"]
args:
- KUBITUS_TMP="$(mktemp -d)" &&
export XDG_CACHE_HOME="$KUBITUS_TMP/cache" &&
export XDG_CONFIG_HOME="$KUBITUS_TMP/config" &&
export XDG_DATA_HOME="$KUBITUS_TMP/data" &&
export HELM_HOME="$KUBITUS_TMP" &&
[ -z "$HELM_REPOSITORY_URLS" ] || helm repo add "$HELM_REPOSITORY_NAMES" "$HELM_REPOSITORY_URLS" &&
helm dependency build &&
rm -r "$KUBITUS_TMP"
generate:
command: [sh, -c]
args:
- helm template --release-name "$ARGOCD_APP_NAME" --namespace "$ARGOCD_APP_NAMESPACE" . > all.yaml &&
kustomize build In application: apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: "prometheus-stack"
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
repoURL: "https://gitlab.example.org/gitops/infra.git"
targetRevision: main
path: "prometheus-stack"
plugin:
name: kustomized-helm
env:
- name: HELM_REPOSITORY_NAMES
value: "kube-prometheus-stack"
- name: HELM_REPOSITORY_URLS
value: "https://prometheus-community.github.io/helm-charts"
destination:
name: ''
namespace: "prometheus-stack"
server: 'https://kubernetes.default.svc'
In the repo: $ cat prometheus-stack/kustomization.yaml
resources:
- ./all.yaml
patchesStrategicMerge:
- |-
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
argocd.argoproj.io/sync-options: Replace=true
name: prometheuses.monitoring.coreos.com Relevant bug and commits in the kubitus-installer repo:
|
Co-authored-by: Alexander Matyushentsev <[email protected]>
I am trying to follow the post-render example using kustomize. I am pointing directly to this online repo:
I get:
I did some research, and found that someone else who got this says it means the patch is targeting something that doesn't exist (in this case, release-name-helmguestbook deployment). But why would that be? we don't need to separately deploy the helm chart right? we cannot do both helm and plugin in the same app object.
unless the example readme is leaving out a step i would think you can use it "as is".
I think the plugin installed successfully, since it is indeed trying to run the provided generate command (helm template --args)
The text was updated successfully, but these errors were encountered: