Skip to content
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

Error when deploy through ArgoCD #84

Closed
Artem3213212 opened this issue Aug 17, 2024 · 2 comments
Closed

Error when deploy through ArgoCD #84

Artem3213212 opened this issue Aug 17, 2024 · 2 comments
Labels
bug Something isn't working no-stale

Comments

@Artem3213212
Copy link

What actually happened?

Error:

Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): failed to set app instance tracking info on manifest: failed to set app instance label: failed to get labels from target object /v1, Kind=ServiceAccount default/salad-init-settings-deploy-virtual-kubelet-saladcloud-provider: .metadata.labels accessor error: contains non-string value in the map under key "app.kubernetes.io/version": <nil> is of the type <nil>, expected string

ArgoCD Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: salad-init-settings-deploy
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  destination:
    name: https://kubernetes.default.svc
  sources:
    - path: charts/virtual-kubelet
      repoURL: https://github.com/SaladTechnologies/virtual-kubelet-saladcloud.git
      targetRevision: main
      helm:
        valuesObject:
          salad:
            apiKey: ***
            organizationName: ***
            projectName: ***
  syncPolicy:
    automated: {}
    syncOptions: # Sync options which modifies sync behavior
      - Validate=false # disables resource validation (equivalent to 'kubectl apply --validate=false') ( true by default ).
      - CreateNamespace=true # Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster.
      - PrunePropagationPolicy=foreground # Supported policies are background, foreground and orphan.
      - PruneLast=true # Allow the ability for resource pruning to happen as a final, implicit wave of a sync operation
  revisionHistoryLimit: 10

What did you expect to happen?

ArgoCD deploy application

How can we reproduce it?

Deploy ArgoCD, and apply Application manifest I gived above.

Anything else we should know?

Under hood ArgoCD used helm template ... comand (It render results to file instead of applying them to cluster). I think problem may related with this.

What is the version of your SaladCloud Virtual Kubelet Provider?

main branch

What is the version of your Kubernetes cluster?

1.29

@Artem3213212 Artem3213212 added the bug Something isn't working label Aug 17, 2024
Copy link

There hasn't been activity on this issue in 30 days.
This issue has been marked stale and will be closed in 7 days if no further activity occurs.
Issues with the labels no-stale, help wanted, and good first issue are exempt from this policy.

@svscorp
Copy link
Contributor

svscorp commented Jan 3, 2025

@Artem3213212 I guess the problem is in the chart itself.

In template, the app.kubernetes.io/version is coming from .Chart.AppVersion. And Chart.yaml doesn't have it, so it is evaluated as nil.

I would assume it's either a typo, and it should come from .Chart.version or the appVersion: 0.1.0 is missing in the chart.

I've created a PR with a fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-stale
Projects
None yet
Development

No branches or pull requests

3 participants