zegl / kube-score

Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
https://kube-score.com
MIT License
2.72k stars 174 forks source link

Feature request: Support Argo Rollouts #430

Open zidadrtl opened 2 years ago

zidadrtl commented 2 years ago

Would be nice to support Argo Rollouts CRD's as deployment type (now this is not recognized as a valid target reference):

For example:

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-service
spec:
  strategy:
    canary:
      analysis:
        templates:
          - templateName: build-low-error-low-latency
        args:
          - name: service
            value: my-service
          - name: namespace
            value: my-namespace
          - name: build
            value: $(BUILD)
        startingStep: 1
      steps:
        - setWeight: 100
        - pause: {duration: 10m}
kmarteaux commented 2 years ago

Argo Rollouts has validation rules built in -- see https://github.com/argoproj/argo-rollouts/blob/master/pkg/apis/rollouts/validation/validation.go for the details. Have you tried the https://argoproj.github.io/argo-rollouts/generated/kubectl-argo-rollouts/kubectl-argo-rollouts_lint/ feature?

zidadrtl commented 2 years ago

@kmarteaux did not know about that, will try it, many thanks!

Ayushwiprobflex7239 commented 2 years ago

Argo Rollouts has validation rule built in -- see to the same program written by me I have tried my level bes to solve the query

bitti commented 2 years ago

The problem is not resolved by the fact that argo has its own linter. The problem is that kube-score gives these false negatives:

    [CRITICAL] Service Targets Pod
        · The services selector does not match any pods

I suppose that's because it doesn't check these selectors against the argo rollout pod template labels?

bbortt commented 2 years ago

The services selector does not match any pods

we're experiencing the same problem. would be cool to have this. I don't know anything about the implementation of kube-score itself, so helping is hard. but testing is no problem for sure.