diff options
| author | Suren A. Chilingaryan <csa@suren.me> | 2018-02-25 06:02:41 +0100 | 
|---|---|---|
| committer | Suren A. Chilingaryan <csa@suren.me> | 2018-02-25 06:02:41 +0100 | 
| commit | 93c950b8e2f06a62bb4b7b0f463eec125118aafc (patch) | |
| tree | 9ab350f513c3e8b2e8f4444146589ac7a5cb615d /setup | |
| parent | 782397f3de45fd1585ff0e5361ff5b61c24c5dd4 (diff) | |
ADEI metadata
Diffstat (limited to 'setup')
| -rw-r--r-- | setup/projects/adei/templates/10-adei-build.yml.j2 | 8 | ||||
| -rw-r--r-- | setup/projects/adei/templates/60-adei.yml.j2 | 22 | ||||
| -rw-r--r-- | setup/projects/adei/vars/globals.yml | 18 | 
3 files changed, 36 insertions, 12 deletions
| diff --git a/setup/projects/adei/templates/10-adei-build.yml.j2 b/setup/projects/adei/templates/10-adei-build.yml.j2 index f961219..8ca84d8 100644 --- a/setup/projects/adei/templates/10-adei-build.yml.j2 +++ b/setup/projects/adei/templates/10-adei-build.yml.j2 @@ -2,6 +2,8 @@ apiVersion: v1  kind: Template  metadata:    name: adei-build +  labels: +    app: adei    annotations:      descriptions: "ADEI Build"  objects: @@ -9,16 +11,14 @@ objects:      apiVersion: v1      metadata:        name: adei -      labels: -        name: adei    - kind: "BuildConfig"      apiVersion: "v1"      metadata:        name: "adei" -      labels: -        name: adei      spec:  #      runPolicy: "Serial" +      successfulBuildsHistoryLimit: "{{ adei_pod_history_limit }}" +      failedBuildsHistoryLimit: "{{ adei_pod_history_limit }}"        triggers:           - type: "ConfigChange"        source:  diff --git a/setup/projects/adei/templates/60-adei.yml.j2 b/setup/projects/adei/templates/60-adei.yml.j2 index 41840e4..1bff206 100644 --- a/setup/projects/adei/templates/60-adei.yml.j2 +++ b/setup/projects/adei/templates/60-adei.yml.j2 @@ -32,6 +32,10 @@ objects:      kind: Service      metadata:        name: "{{ cfg.name }}" +      labels: +        adei-type: "{{ pod_type }}" +        adei-name: "{{ name }}" +        adei-setup: "${setup}"      spec:        selector:          name: "{{ cfg.name }}" @@ -43,6 +47,10 @@ objects:      kind: Route      metadata:        name: "{{ cfg.name }}" +      labels: +        adei-type: "{{ pod_type }}" +        adei-name: "{{ name }}" +        adei-setup: "${setup}"      spec:        host: "{{ cfg.node }}"        to: @@ -59,11 +67,15 @@ objects:      kind: CronJob      metadata:        name: "{{ cfg.name }}" +      labels: +        adei-type: "{{ pod_type }}" +        adei-name: "{{ name }}" +        adei-setup: "${setup}"      spec:        schedule: "{{ cfg.cron }}"        concurrencyPolicy: "Forbid" -      successfulJobsHistoryLimit: "2" -      failedJobsHistoryLimit: "2" +      successfulJobsHistoryLimit: "{{ adei_pod_history_limit }}" +      failedJobsHistoryLimit: "{{ adei_pod_history_limit }}"        jobTemplate:          spec:              completions: "1" @@ -78,9 +90,13 @@ objects:      kind: DeploymentConfig      metadata:        name: "{{ cfg.name }}" +      labels: +        adei-type: "{{ pod_type }}" +        adei-name: "{{ name }}" +        adei-setup: "${setup}"      spec:              replicas: "{{ cfg.replicas }}" -            revisionHistoryLimit: 2  +            revisionHistoryLimit: "{{ adei_pod_history_limit }}"              selector:                name: "{{ cfg.name }}"              strategy: diff --git a/setup/projects/adei/vars/globals.yml b/setup/projects/adei/vars/globals.yml index 91f5933..72262e5 100644 --- a/setup/projects/adei/vars/globals.yml +++ b/setup/projects/adei/vars/globals.yml @@ -1,5 +1,7 @@  adei_domain: "{{ openshift_master_default_subdomain }}" +adei_pod_history_limit: 2 +  adei_pod_env:      - name: "HOME"        value: "/tmp" @@ -21,8 +23,6 @@ adei_pod_env:        value: "${adei_revision}"      - name: "ADEI_PATH"        value: "/adei/src" -    - name: "ADEI_URL" -      value: "http://adei-${setup}.adei.svc.cluster.local/adei"  adei_prod_env:      - name: "ADEI_SETUP" @@ -35,6 +35,8 @@ adei_prod_env:        value: "${enable_debug}"      - name: "APACHE_SERVERS"        value: "${apache_servers}" +    - name: "ADEI_CONTINUOUS_CACHING" +      value: "${continuous_caching}"  adei_log_env:      - name: "ADEI_SETUP" @@ -66,13 +68,15 @@ adei_cron_env:      - name: "ADEI_SCHEDULER"        value: "${sched_parallel}" -adei_ccache_env: +adei_update_env:      - name: "ADEI_CONTINUOUS_CACHING"        value: "${continuous_caching}"  adei_cache_env:      - name: "ADEI_SETUP"        value: "${setup}" +    - name: "ADEI_URL" +      value: "http://adei-${setup}.adei.svc.cluster.local/adei"      - name: "ADEI_PARALLEL"        value: "${cache_parallel}"      - name: "ADEI_IDLE_SLEEP" @@ -81,6 +85,8 @@ adei_cache_env:  adei_arc_cache_env:      - name: "ADEI_SETUP"        value: "${setup}" +    - name: "ADEI_URL" +      value: "http://adei-${setup}.adei.svc.cluster.local/adei"      - name: "ADEI_PARALLEL"        value: "${cache_parallel}"      - name: "ADEI_IDLE_SLEEP" @@ -89,6 +95,8 @@ adei_arc_cache_env:  adei_log_cache_env:      - name: "ADEI_SETUP"        value: "${setup}-logs" +    - name: "ADEI_URL" +      value: "http://adei-${setup}-logs.adei.svc.cluster.local/adei"      - name: "ADEI_PARALLEL"        value: "${sched_parallel}"      - name: "ADEI_IDLE_SLEEP" @@ -172,7 +180,7 @@ adei_frontends:        name: "adei-${setup}-cacher"        replicas: "${cache_replicas}"        cmd: [ "/bin/bash", "/adei/src/scripts/system/cacher.sh" ] -      env: "{{ adei_pod_env | union(adei_cache_env) | union(adei_ccache_env) }}" +      env: "{{ adei_pod_env | union(adei_cache_env) }}"        vols: "{{ adei_pod_vols }}"        mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}"        groups: [ "adei" ] @@ -199,7 +207,7 @@ adei_frontends:        name: "adei-${setup}-update"        cron: "${update_schedule}"        cmd: [ "/bin/bash", "/adei/src/scripts/cron/adei.cron.sh" ] -      env: "{{ adei_pod_env | union(adei_cron_env) | union(adei_ccache_env) }}" +      env: "{{ adei_pod_env | union(adei_cron_env) | union(adei_update_env) }}"        vols: "{{ adei_pod_vols }}"        mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}"        groups: [ "adei" ] | 
