ks-devops icon indicating copy to clipboard operation
ks-devops copied to clipboard

Support to set Kustomization parameters of an Application

Open LinuxSuRen opened this issue 3 years ago • 6 comments

LinuxSuRen avatar Jun 28 '22 05:06 LinuxSuRen

/area console /kind feature

LinuxSuRen avatar Jun 28 '22 05:06 LinuxSuRen

/assign @EliChen95

LinuxSuRen avatar Jul 12 '22 02:07 LinuxSuRen

@LinuxSuRen: GitHub didn't allow me to assign the following users: EliChen95.

Note that only kubesphere members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to this:

/assign @EliChen95

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

ks-ci-bot avatar Jul 12 '22 02:07 ks-ci-bot

/assign

EliChen95 avatar Jul 12 '22 03:07 EliChen95

Basically, this issue requests to allow users to set the parameters like the following kustomize part.

spec:
  argoApp:
    spec:
      source:
        repoURL: 'https://github.com/kubesphere/console'
        path: .
        targetRevision: HEAD
        kustomize:
          namePrefix: my_
          nameSuffix: _end
          images:
            - 'nginx=nginx:latest'
          commonLabels:
            name: rick
          commonAnnotations:
            name: rick
          forceCommonLabels: true
          forceCommonAnnotations: true

and you could get the old image list from the following annotation:

metadata:
  annotations:
    gitops.kubesphere.io/images: >-
      ghcr.io/opensource-f2f/kube-rbac-proxy:v0.8.0,ghcr.io/opensource-f2f/open-podcasts-apiserver:dev,ghcr.io/opensource-f2f/open-podcasts:dev

See the description of above fields from https://github.com/kubesphere/ks-devops/blob/59547bbae728f21875e2229db15753a0d91af2a6/pkg/api/gitops/v1alpha1/application.go#L245

See also https://argo-cd.readthedocs.io/en/stable/user-guide/kustomize/

LinuxSuRen avatar Jul 13 '22 07:07 LinuxSuRen

By the way, we need to provide an option to choose which Configuration Tool that they want to use. The possible values are: kustomize, helm and auto.

In this case, users need to choose kustomize before setting those parameters.

LinuxSuRen avatar Jul 13 '22 07:07 LinuxSuRen