Service-Hub icon indicating copy to clipboard operation
Service-Hub copied to clipboard

[EPIC] Templates

Open vadim-zabolotniy opened this issue 2 years ago • 0 comments

MR: https://github.com/JovianX/service-hub/pull/11 Related tickets:

  1. ~~#45 - Basic CRUD~~
  2. ~~#46 - Deploy application~~
  3. #48 - Terminate application
  4. #49 - Update application Helm values
  5. #50 - Change application template
  6. #54 - Update user's inputs and update releases.

Template actions:

  • [x] Create template revision
  • [x] Update [description | enable status]
  • [x] Set default
  • [x] Delete template

  • [x] Template - A template is a YAML file (in the future can be a tar.gz file that includes a template.yaml in root + helm charts)
  • [x] Template has the attributes name[string], revision[int], creation_date[date], default[boolean], enable[boolean]
  • [x] Tempalte name is determined in the tempalte yaml
  • [x] Template revision - automatically generated, starts with 1, increases by 1 on upload of a template with same name
  • [x] Template default is a boolean, indicating which template is the default per application (each application can have only 1 default)
  • [x] Template YAML has the following structure
  • [x] Store original YAML manifest(to preserve formatting and comments)
name: myapp     # required

charts:
  - name: test-jovianx20-application-nginx-ingress
    chart: nginx-stable/nginx-ingress
    version: 0.14.0
    values:
      # Inline values, passed via a temporary values file and --values, so that it doesn't suffer from type issues like --set
      - address: https://vault.example.com
        someparam:
            nested:
                morenest: cool
        db:
          username: {{ inputs.username }}

      - controller:
          ingressClass: {{ inputs.ingress_class_name }}
  - name: vadim-jovianx20-redis
    chart: bitnami/redis
    version: 17.0.6
    values:
      - url: https://vault.example.com
        someparam:
            nested:
                morenest: cool
        db:
          username: {{ inputs.username }}



inputs:                 # optional
  - name: username      # required
    type: string        # required, Options: string, select, checkbox
    lable: 'User Name'  # optional
    defualt: 'user'     # optional
  - name: ingress_class_name
    type: string
    lable: 'Nginx ingress class name'
    defualt: nginx

vadim-zabolotniy avatar Aug 03 '22 13:08 vadim-zabolotniy