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

[Proposal] supporting to config sealer app to enrich the clusterfile's capabilities #1969

Open
kakaZhou719 opened this issue Jan 11, 2023 · 0 comments
Assignees
Labels
kind/feature Category issues or PRs related to feature request

Comments

@kakaZhou719
Copy link
Member

kakaZhou719 commented Jan 11, 2023

Issue Description

Type: feature request

Describe what feature you want

currently ,we can support launching the corresponding app through ClusterSpec.APPNames,
Or directly use ClusterSpec.CMD to overwrite the app launch cmds.

however, for different types of apps, we have different startup commands and launch files, could we precisely support the configuration of the app at run stage?

so i proposal that we could add Application kind as below, for extensibility supporting config the sealer app and enrich the clusterfile's capabilities

  1. for app files: We can modify the app file content according to the specified file path, such as overwrite,merge,render.
  2. for app launch and delete: We can configure the corresponding launch or delete depending on the type of app, such as helm,kube,shell. At the same time, we can also support the raw launch command line.
  3. for cmds and appNames they are mutually exclusive, could be overwrite from clusterspec and cli flags.
    4. for env its a global key pair used to do render(kube),export shell env(shell), set values.yaml(helm).
apiVersion: sealer.io/v2
kind: Application
metadata:
  name: my-apps
spec:
    image: my-app:v1
    cmds: 
      - kubectl apply -f ns.yaml
    appNames: 
      - app1
      - app2
      - app3
    configs:
    - name: app1
      delete :
         - kubectl delete -f ns.yaml
         - kubectl delete -f nginx.yaml -n namespace
      launch:
        cmds:
          - kubectl apply -f ns.yaml
          - kubectl apply -f nginx.yaml -n namespace
      files:
        - filePath: ns.yaml
          valueType: 'raw(overwrite),args(render),secret,namespace'
          values:
            - key1=value1
            - key2=value2
    - name: app2
      launch:
        cmds:
          - helm install my-nginx bitnami/nginx
        helm:
          chartName: my-nginx
          namespace: sealer
          values:
            - key1=value1
            - key2=value2
      files:
        - filePath: values.yaml
          valueType: raw
          values:
            - key1=value1
            - key2=value2
    - name: app3
      launch:
        cmds:
          - bash nginx.sh
        shell:
          env:
            - key1=value1
            - key2=value2
          filePath:
            - preinstall.sh
            - nginx.sh
      files:
        - filePath: preinstall.sh
          valueType: raw
          values: |
            kubectl create ns sealer            
            

Additional context

Add any other context or screenshots about the feature request here.

@kakaZhou719 kakaZhou719 added the kind/feature Category issues or PRs related to feature request label Jan 11, 2023
@kakaZhou719 kakaZhou719 self-assigned this Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Category issues or PRs related to feature request
Projects
None yet
Development

No branches or pull requests

1 participant