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

Add export functionality for project configuration #432

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

drshrey
Copy link
Contributor

@drshrey drshrey commented Feb 20, 2019

This addresses part 1 of 2 for supporting project configurations. This commit allows projects to be exported in a YAML format and also introduces the concept of a ResourceConfig.

An example of an exported project config:

settings:
  gitBranch: master
  continuousDeploy: true
extensions:
  - customConfig: '{}'
    config: |
      []
    key: githubstatus
  - customConfig: '{}'
    config: |
      []
    key: dockerbuilder
  - customConfig: '{}'
    config: |
      []
    key: 'kubernetes:deployment'
  - customConfig: '{}'
    config: |
      - source: ""
        key: WEBHOOK_URL
        value: https://hooks.slack.com/...
        secret: false
      - source: ""
        key: CHANNEL
        value: '#devops-test'
        secret: false
    key: slack
  - customConfig: >-
      {"type": "loadbalancer", "ingress":
      "...",
      "service": "www:80", "protocol": "TCP", "subdomain": "",
      "upstream_domains": [{"apex": "...", "subdomain":
      "deploy-test"}, {"apex": "...", "subdomain": "deploy-test"}]}
    config: |
      []
    key: 'kubernetes:ingressroute'
  - customConfig: >-
      {"subdomain": "deploy-test", "loadbalancer":
      "...",
      "loadbalancer_fqdn":
      "...",
      "loadbalancer_type": "loadbalancer"}
    config: |
      []
    key: route53
secrets:
  - key: ENV_TEST
    value: test
    type: env
    isSecret: false
  - key: secrets-test.txt
    value: 'Hi, I am a secret. Please test for my presence!'
    type: file
    isSecret: false
  - key: WEBHOOK_URL
    value: ...
    type: env
    isSecret: true
services:
  - service:
      command: echo hello & exit
      name: 'true'
      type: one-shot
      count: 0
      servicePorts: []
      deploymentStrategy:
        type: ''
        maxUnavailable: 0
        maxSurge: 0
      readinessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      livenessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      preStopHook: ''
  - service:
      command: echo hello & exit
      name: 'true'
      type: one-shot
      count: 0
      servicePorts: []
      deploymentStrategy:
        type: ''
        maxUnavailable: 0
        maxSurge: 0
      readinessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      livenessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      preStopHook: ''
  - service:
      command: echo hello & exit
      name: 'true'
      type: one-shot
      count: 0
      servicePorts: []
      deploymentStrategy:
        type: ''
        maxUnavailable: 0
        maxSurge: 0
      readinessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      livenessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      preStopHook: ''
  - service:
      command: echo hello & exit
      name: 'true'
      type: one-shot
      count: 0
      servicePorts: []
      deploymentStrategy:
        type: ''
        maxUnavailable: 0
        maxSurge: 0
      readinessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      livenessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      preStopHook: ''
  - service:
      command: echo hello & exit
      name: 'true'
      type: one-shot
      count: 0
      servicePorts: []
      deploymentStrategy:
        type: ''
        maxUnavailable: 0
        maxSurge: 0
      readinessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      livenessProbe:
        type: ''
        method: ''
        command: ''
        port: 0
        scheme: ''
        path: ''
        httpHeaders: []
        initialDelaySeconds: 0
        periodSeconds: 0
        timeoutSeconds: 0
        successThreshold: 0
        failureThreshold: 0
      preStopHook: ''

@codecov
Copy link

codecov bot commented Feb 20, 2019

Codecov Report

Merging #432 into master will decrease coverage by 0.17%.
The diff coverage is 50%.

@@            Coverage Diff             @@
##           master     #432      +/-   ##
==========================================
- Coverage   57.49%   57.31%   -0.18%     
==========================================
  Files          62       68       +6     
  Lines        6632     6790     +158     
==========================================
+ Hits         3813     3892      +79     
- Misses       2394     2459      +65     
- Partials      425      439      +14

@drshrey drshrey changed the title Add project configuration Add export functionality for project configuration Feb 25, 2019
@drshrey drshrey added the S/Review Status: Please review label Feb 26, 2019
@drshrey drshrey removed the S/Review Status: Please review label Feb 26, 2019
@drshrey drshrey added P/High Priority: High S/Review Status: Please review labels Feb 26, 2019
@drshrey drshrey added S/In Progress Status: In Progress and removed S/Review Status: Please review labels Feb 28, 2019
@drshrey drshrey closed this Feb 28, 2019
@drshrey drshrey reopened this Feb 28, 2019
@drshrey drshrey added S/Review Status: Please review and removed S/In Progress Status: In Progress labels Feb 28, 2019
@drshrey drshrey self-assigned this Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P/High Priority: High S/Review Status: Please review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants