Remove unused legacy files, rewrite README for the actual system
~65 files carried over unmodified from the original org-wide library (GKE/EKS-specific pipeline entry points, real Maven/Gradle/Node/Python/ PHP/Rust build stages entangled with AWS ECR/S3, GCP GAR/GCS, JFrog, Sonar, a hardcoded internal security-scan endpoint, GitHub-specific multi-branch scripting, BU/team org validation, and their supporting pod templates/Helm value templates) — none directly usable without a full rewrite regardless (same effort as what's already built for the 5 supported languages), so removed rather than kept as unused reference. Also drops the Gradle wrapper (build.gradle, gradlew) — its test suite was already removed in an earlier cleanup this session, so nothing was left to build/test with it. README.md rewrote entirely — it was still describing the old system (eksCICD entry point, GKE/EKS, JFrog, S3, buTeamMapping) and even referenced buildObjHelper.groovy, a file this same commit removes. Only the live path remains: 7 stage files, 1 utility, 3 vars files, the 5 language fallback Dockerfiles + Jenkinsfile template, and the dind pod template + build-tools Dockerfile.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
# This sample, non-production-ready template describes an Amazon EC2 instance and an Elastic Load Balancer.
|
||||
# © 2020 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
|
||||
# This AWS Content is provided subject to the terms of the AWS Customer Agreement available at
|
||||
# http://aws.amazon.com/agreement or other written agreement between Customer and either
|
||||
# Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both.
|
||||
# ARG ACCOUNT_ID=766380763301
|
||||
|
||||
FROM ${buildRegistry}/build/java:8-jdk-slim-secure_v1.0
|
||||
#FROM asia-southeast1-docker.pkg.dev/supply-poc-351106/homelab-devops/java:8
|
||||
ARG artifactId=sample
|
||||
ARG XMS=2G
|
||||
ARG XMX=2G
|
||||
ARG target
|
||||
|
||||
ADD https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.15.0/jmx_prometheus_javaagent-0.15.0.jar /opt/jmx_exporter.jar
|
||||
#ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.17.0/opentelemetry-javaagent.jar /opt/opentelemetry-javaagent.jar
|
||||
|
||||
### Config added through configmap
|
||||
# COPY config.yaml /opt/config.yaml
|
||||
EXPOSE 8880 8010
|
||||
|
||||
COPY ${artifactId}/target/*.jar /opt/target/${artifactId}.jar
|
||||
RUN mkdir -p /var/log/${artifactId} && touch /var/log/${artifactId}/gc.log
|
||||
|
||||
WORKDIR /opt/target
|
||||
|
||||
CMD ["${artifactId}.jar", "-javaagent:/opt/jmx_exporter.jar=8880:/opt/config/jmx-config.yaml", \
|
||||
"-XX:MinRAMPercentage=50.0", "-XX:MaxRAMPercentage=80.0", \
|
||||
"-XX:+UseParallelGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails", \
|
||||
"-XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime", "-XX:+PrintHeapAtGC", \
|
||||
"-Xloggc:/var/log/${artifactId}/gc.log", \
|
||||
"-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=9000k", \
|
||||
"-Xms${XMS}", "-Xmx${XMX}"]
|
||||
@@ -1,31 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: ${env_ns}-${app_name}
|
||||
namespace: ${argoAppNS}
|
||||
labels:
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
app_name: ${app_name}
|
||||
service: ${app_name}
|
||||
env: ${environment}
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
commit_id: ${commit_id}
|
||||
spec:
|
||||
destination:
|
||||
namespace: ${env_ns}-${app_name}
|
||||
<% if (CLOUD_PROVIDER == 'AWS') { print "server: ${clusterName}" } %>
|
||||
<% if (CLOUD_PROVIDER == 'GCP') { print "name: ${clusterName}" } %>
|
||||
project: ${buini}-${teamini}
|
||||
source:
|
||||
helm:
|
||||
valueFiles:
|
||||
- ../${helm_values_path}/values.yaml
|
||||
path: ${helm_version}
|
||||
repoURL: https://github.com/Homelab/devops-helm-charts.git
|
||||
targetRevision: ${branch_name}
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
|
||||
repo_name: ${repo_name}
|
||||
maintainer: ${maintainer}
|
||||
skip_sonar: true
|
||||
build_tool: docker
|
||||
dockerBuildVersion: ${dockerBuildVersion}
|
||||
arch: ${arch}
|
||||
<% if (excludedMoudles){ println 'excludedModules:';for(module in excludedMoudles){ println ' - '+module }} %>team: ${team}
|
||||
bu: ${bu}
|
||||
deployArgo: true
|
||||
deployment_order:
|
||||
<% for (deployment in deployment_order){println ' - '+deployment} %><% if (branch_params){ println 'branch_params:'; branch_params.each {entry -> println " $entry.key:";entry.value.each{ val_e -> println " $val_e.key:$val_e.value" }}} %>
|
||||
notify_channel: ${slack_channel}
|
||||
@@ -1,99 +0,0 @@
|
||||
repoName: ${repo_name}
|
||||
applicationName: ${app_name}
|
||||
appType: ${dockerBuildVersion}
|
||||
deployment:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
canary:
|
||||
enabled: false
|
||||
autoscaling:
|
||||
enabled: false
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
maxUnavailable: 100%
|
||||
minAvailable: ""
|
||||
cron:
|
||||
enabled: true
|
||||
concurrencyPolicy: ${concurrencyPolicy}
|
||||
failedJobsHistoryLimit: ${failedJobsHistoryLimit}
|
||||
successfulJobsHistoryLimit: ${successfulJobsHistoryLimit}
|
||||
suspend: false
|
||||
startingDeadlineSeconds: ${startingDeadlineSeconds}
|
||||
backoffLimit: ${backoffLimit}
|
||||
restartPolicy: ${restartPolicy}
|
||||
env:
|
||||
- name: PRISMSDK_ENVIRONMENT
|
||||
value: ${prismsdk_environment}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module+'' %>
|
||||
tag: ${tag}
|
||||
podAnnotations:
|
||||
<% if (appMetrics && dockerBuildVersion.contains("maven")) { print 'jmx.io/path: /metrics' %>
|
||||
<% print 'jmx.io/port: "8880"' %>
|
||||
<% print 'jmx.io/scrape: "true"'} %>
|
||||
<% if (nodeSelector.contains("arm64") && (environment=="int" || environment=="prd")) { print 'telegraf.influxdata.com/image: 847438129436.dkr.ecr.ap-southeast-1.amazonaws.com/telegraf:1.24.4-arm64' } %>
|
||||
<% if ( CLOUD_PROVIDER == "GCP" ) { print 'telegraf.influxdata.com/image: asia-southeast1-docker.pkg.dev/homelab-devops-admin-0622/admin/sre/telegraf:1.24.4' } %>
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> if(v instanceof String) { println " ${k}: '${v}'"} else { println " ${k}: ${v}" }};} else {print ''} %>
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
<% println ' jobs:'; for(val in jobs){ val.each{k,v -> println " ${k}:"; println " resources:"; println " limits:"; println " cpu: ${v.cpu_limit}"; println " memory: ${v.memory_limit}i"; println " requests:"; println " cpu: ${v.cpu_request}"; println " memory: ${v.memory_request}i"; println " schedule: \"${v.schedule}\""; if (v.command instanceof List){ println ' command:'; for (com in v.command ) { if (com != v.command.last()){ println " - ${com}" } else {println " - ${com};touch /tmp/podtermination/telegraf-termination"} }}; if(v.args){ if (v.args instanceof List){ println ' args:'; for (arg in v.args ) { println " - ${arg}" } }}}} %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
ingress:
|
||||
enabled: false
|
||||
jmxconfig:
|
||||
enabled: true
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
enabled: false
|
||||
|
||||
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
@@ -1,203 +0,0 @@
|
||||
---
|
||||
- name: Playbook to deploy Jar
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
become: yes
|
||||
become_method: sudo
|
||||
|
||||
tasks:
|
||||
- name: Check if region is configured
|
||||
shell: "aws configure get default.region"
|
||||
register: aws_cli_region_reponse
|
||||
|
||||
- name: "ERROR: AWS region missing"
|
||||
vars:
|
||||
msg: |
|
||||
#############################################################################################################################
|
||||
####### AWS REGION IS NOT CONFIGURED PROPERLY. CURRENT REGION: {{ aws_cli_region_reponse.stdout | upper }}, SHOULD BE: AP-SOUTHEAST-1 #######
|
||||
#############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
when: aws_cli_region_reponse.stdout != "ap-southeast-1"
|
||||
failed_when:
|
||||
- aws_cli_region_reponse.stdout != "ap-southeast-1"
|
||||
|
||||
- name: Check if CICD profile is configured
|
||||
shell: "aws configure get region --profile cicd"
|
||||
register: aws_profile_cli_region_reponse
|
||||
|
||||
- name: "ERROR: AWS region missing in profile"
|
||||
vars:
|
||||
msg: |
|
||||
#############################################################################################################################
|
||||
####### AWS REGION IS NOT CONFIGURED PROPERLY. CURRENT REGION: {{ aws_cli_region_reponse.stdout | upper }}, SHOULD BE: AP-SOUTHEAST-1 #######
|
||||
#############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
when: aws_profile_cli_region_reponse.stdout != "ap-southeast-1"
|
||||
failed_when:
|
||||
- aws_profile_cli_region_reponse.stdout != "ap-southeast-1"
|
||||
|
||||
- name: Check if IAM role is attached
|
||||
shell: "aws sts get-caller-identity"
|
||||
register: aws_cli_gci_reponse
|
||||
|
||||
- name: "ERROR: IAM role missing"
|
||||
vars:
|
||||
msg: |
|
||||
#############################################################################################################################
|
||||
############################################### CICD ROLE IS NOT ATTACHED ###############################################
|
||||
#############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
when:
|
||||
- aws_cli_gci_reponse.stdout is not search("assumed-role/cicd")
|
||||
failed_when:
|
||||
- aws_cli_gci_reponse.stdout is not search("assumed-role/cicd")
|
||||
|
||||
- name: Check if systemd service exists
|
||||
stat:
|
||||
path: "/etc/systemd/system/{{ app_name }}.service"
|
||||
register: service_status
|
||||
|
||||
- name: Systemd service status
|
||||
vars:
|
||||
msg: |
|
||||
#############################################################################################################################
|
||||
################################ SYSTEMD SERVICE {{ app_name | upper }} DOES NOT EXIST. EXITING. ##################################
|
||||
#############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
when: service_status is defined and not service_status.stat.exists
|
||||
failed_when:
|
||||
- not service_status.stat.exists
|
||||
|
||||
- name: Check application directory structure
|
||||
block:
|
||||
|
||||
- name: Check application directory structure
|
||||
stat:
|
||||
path: "/home/ubuntu/{{ app_name }}"
|
||||
register: app_dir_status
|
||||
|
||||
- name: Application directory does not exist
|
||||
vars:
|
||||
msg: |
|
||||
#############################################################################################################################
|
||||
###################### APPLICATION DIRECTORY: /home/ubuntu/{{ app_name }} DOES NOT EXIST. EXITING. #######################
|
||||
#############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
when: app_dir_status is defined and not app_dir_status.stat.exists
|
||||
failed_when:
|
||||
- not app_dir_status.stat.exists
|
||||
|
||||
tags:
|
||||
- artifact_deployment
|
||||
|
||||
- name: Ensure jq is installed
|
||||
apt:
|
||||
name: "jq"
|
||||
state: present
|
||||
force_apt_get: yes
|
||||
|
||||
- name: Checking if environment file exists, pre-deployment
|
||||
stat:
|
||||
path: "/etc/sysconfig/{{ app_name }}"
|
||||
register: env_file
|
||||
|
||||
- name: Backing up current properties
|
||||
copy:
|
||||
src: "/etc/sysconfig/{{ app_name }}"
|
||||
dest: "/etc/sysconfig/rollback-{{ app_name }}"
|
||||
owner: ubuntu
|
||||
group: ubuntu
|
||||
mode: '0664'
|
||||
remote_src: yes
|
||||
force: yes
|
||||
when: env_file.stat.exists
|
||||
|
||||
- name: Checking if current symlink exists, pre-deployment
|
||||
stat:
|
||||
path: "/home/ubuntu/{{ app_name }}/{{ app_name }}-current.jar"
|
||||
register: current_symlink
|
||||
|
||||
- name: Show output
|
||||
debug: msg= "{{ current_symlink }}"
|
||||
|
||||
- name: Checking if current artifact exists, pre-deployment
|
||||
stat:
|
||||
path: "{{ current_symlink.stat.lnk_source }}"
|
||||
when:
|
||||
- current_symlink.stat.exists
|
||||
- current_symlink.stat.islnk
|
||||
register: current_artifact
|
||||
|
||||
- name: Show output
|
||||
debug: msg= "{{ current_artifact }}"
|
||||
|
||||
- name: Stopping systemd service
|
||||
systemd:
|
||||
name: '{{ app_name }}'
|
||||
state: stopped
|
||||
|
||||
- name: Download latest properties
|
||||
shell: "pull-env '{{ env }}' '{{ app_name }}'"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Download latest artifact
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/home/ubuntu/{{ app_name }}/"
|
||||
owner: ubuntu
|
||||
group: ubuntu
|
||||
with_fileglob:
|
||||
- "{{ repo_name }}/target/*.jar"
|
||||
|
||||
- name: Setting latest_artifact_name
|
||||
set_fact:
|
||||
latest_artifact_name: '{{ item.split("/")[-1] }}'
|
||||
with_fileglob:
|
||||
- "{{ repo_name }}/target/*.jar"
|
||||
|
||||
- name: Creating rollback symlink
|
||||
file:
|
||||
src: "{{ current_artifact.stat.path }}"
|
||||
dest: "/home/ubuntu/{{ app_name }}/rollback"
|
||||
state: link
|
||||
|
||||
- name: Removing current symlink
|
||||
file:
|
||||
path: "/home/ubuntu/{{ app_name }}/{{ app_name }}-current.jar"
|
||||
state: absent
|
||||
|
||||
- name: Creating current symlink to latest artifact
|
||||
file:
|
||||
src: "/home/ubuntu/{{ app_name }}/{{ latest_artifact_name }}"
|
||||
dest: "/home/ubuntu/{{ app_name }}/{{ app_name }}-current.jar"
|
||||
state: link
|
||||
|
||||
- name: Starting systemd service
|
||||
systemd:
|
||||
name: '{{ app_name }}'
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Trying healthcheck
|
||||
uri:
|
||||
url: "http://localhost:{{ app_port }}{{ healthcheck_api }}"
|
||||
method: GET
|
||||
register: healthcheck_response
|
||||
until: healthcheck_response.status == 200
|
||||
retries: 60
|
||||
delay: 1
|
||||
ignore_errors: False
|
||||
|
||||
- name: Healthcheck response
|
||||
vars:
|
||||
msg: |
|
||||
##############################################################################################################################
|
||||
HEALTH-CHECK ({{ healthcheck_api }}) RESPONSE: {{ healthcheck_response.status }}
|
||||
##############################################################################################################################
|
||||
debug:
|
||||
msg: "{{ msg.split('\n') }}"
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=dev
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
stg:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=dev
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=int
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=prd
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args: false
|
||||
command: /app/server
|
||||
|
||||
dev:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args: false
|
||||
command: /app/server
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args: false
|
||||
command: /app/server
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args: false
|
||||
command: /app/server
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${(grpc_host || grpc_hosts) ? app_port : primary_port}\n progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>
|
||||
repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: ${as_down_stable_window}
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
replicaCount: ${replica_count}
|
||||
deployment:
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
<% if (deployment_args){println ' args:'; for (arg in deployment_args){ println ' - '+arg}} %>
|
||||
command:
|
||||
- ${command}
|
||||
enabled: true
|
||||
env:
|
||||
- name: GOMAXPROCS
|
||||
value: ${activeProcessorCount}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 120\n "} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (nodeSelector.contains("arm64") && (environment=="int" || environment=="prd")) { print 'telegraf.influxdata.com/image: 847438129436.dkr.ecr.ap-southeast-1.amazonaws.com/telegraf:1.24.4-arm64' } %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: '${v}'"};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8880
|
||||
name: metric
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
updateStrategy:
|
||||
strategy:
|
||||
<% if (deploymentStrategy == 'recreate') { print " type: Recreate"} else { print " type: RollingUpdate\n rollingUpdate:\n maxUnavailable: 0%\n maxSurge: ${maxSurge}%" } %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/server-snippet: |
|
||||
location ~* "^/api/1.0/search/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
location ~* "^/api/1.0/anonymous/search/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
location ~* "^/search-queries/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
<% if (ingress_annotations) {ingress_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: false
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: <% if (pdbMaxUnavailable) { print "true" } else { print "false" } %>
|
||||
maxUnavailable: ${pdbMaxUnavailable}
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
<% if (addon_ports) { for (p in addon_ports) { println " addons:"; println " - name: ${p.name}"; println " targetPort: ${p.targetPort}"; println " type: ${p.type}"; }} else { println " addon_ports: []" } %>
|
||||
<% if (grpc_port && app_port && (grpc_host || grpc_hosts)) {
|
||||
println " ports:"
|
||||
println " - name: http"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${app_port}"
|
||||
println " grpc_ports:"
|
||||
println " - name: grpc"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${grpc_port}"
|
||||
} else {
|
||||
println " ports:"
|
||||
println " - name: http"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${primary_port}"
|
||||
}
|
||||
%>
|
||||
type: ClusterIP
|
||||
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=dev
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
stg:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=dev
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=int
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- -Dspring.profiles.active=prd
|
||||
- -XX:+UseG1GC
|
||||
- -XX:+PrintGCDateStamps
|
||||
- -XX:+PrintGCDetails
|
||||
- -XX:+PrintGCApplicationStoppedTime
|
||||
- -XX:+PrintGCApplicationConcurrentTime
|
||||
- -XX:+PrintHeapAtGC
|
||||
- -Xloggc:/var/log/gc.log
|
||||
- -XX:+UseGCLogFileRotation
|
||||
- -XX:NumberOfGCLogFiles=5
|
||||
- -XX:GCLogFileSize=9000k
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- pm2-config.json
|
||||
stg:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- pm2-config.json
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- pm2-config.json
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
- pm2-config.json
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${primary_port}\n progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: ${as_down_stable_window}
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
deployment:
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
args:
|
||||
<% for (arg in deployment_args){ println ' - '+arg}%>
|
||||
command:
|
||||
- ${command}
|
||||
enabled: true
|
||||
env: null
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- kill -SIGQUIT 1 ; /bin/sleep 60
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (appMetrics) { print 'prometheus.io/path: "/actuator/prometheus"' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: \"${v}\""};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 9209
|
||||
name: pm2-metrics
|
||||
protocol: TCP
|
||||
- containerPort: 9200
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
replicaCount: ${replica_count}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
updateStrategy:
|
||||
strategy:
|
||||
<% if (deploymentStrategy == 'recreate') { print " type: Recreate"} else { print " type: RollingUpdate\n rollingUpdate:\n maxUnavailable: 0%\n maxSurge: ${maxSurge}%" } %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
<% if (ingress_annotations) {ingress_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: false
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
node_prom_client_enabled: true
|
||||
nameOverride: ""
|
||||
replicaCount: ${replica_count}
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: <% if (pdbMaxUnavailable) { print "true" } else { print "false" } %>
|
||||
maxUnavailable: ${pdbMaxUnavailable}
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
<% if (addon_ports) { for (p in addon_ports) { println " addons:"; println " - name: ${p.name}"; println " targetPort: ${p.targetPort}"; println " type: ${p.type}"; }} else { println " addon_ports: []" } %>
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: ${primary_port}
|
||||
type: ClusterIP
|
||||
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
stg:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
@@ -1,169 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${primary_port}\n progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
appType: php
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: 300
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
deployment:
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
command:
|
||||
- apache2-foreground
|
||||
enabled: true
|
||||
env: null
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 120\n "} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (nodeSelector.contains("arm64") && (environment=="int" || environment=="prd")) { print 'telegraf.influxdata.com/image: 847438129436.dkr.ecr.ap-southeast-1.amazonaws.com/telegraf:1.24.4-arm64' } %>
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
replicaCount: ${replica_count}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
updateStrategy:
|
||||
strategy:
|
||||
<% if (deploymentStrategy == 'recreate') { print " type: Recreate"} else { print " type: RollingUpdate\n rollingUpdate:\n maxUnavailable: 0%\n maxSurge: ${maxSurge}%" } %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
replicaCount: ${replica_count}
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
<% if (ingress_annotations) {ingress_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: false
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: <% if (pdbMaxUnavailable) { print "true" } else { print "false" } %>
|
||||
maxUnavailable: ${pdbMaxUnavailable}
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
<% if (addon_ports) { for (p in addon_ports) { println " addons:"; println " - name: ${p.name}"; println " targetPort: ${p.targetPort}"; println " type: ${p.type}"; }} else { println " addon_ports: []" } %>
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: ${primary_port}
|
||||
type: ClusterIP
|
||||
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
@@ -1,29 +0,0 @@
|
||||
FROM ${buildRegistry}/build/python:2.7-${arch}-0.8.2 as build-system
|
||||
|
||||
COPY ${modules_requirements_file} /app/${modules_requirements_file}
|
||||
|
||||
FROM build-system as intermediate
|
||||
# add credentials on build
|
||||
COPY id_github_jenkins /root/.ssh/id_rsa
|
||||
|
||||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
|
||||
chmod -R 600 /root/.ssh/
|
||||
|
||||
# temp-package python dependencies
|
||||
RUN pip download -r /app/requirements.txt -d /temp-package/python
|
||||
|
||||
### create the runtime image ###
|
||||
FROM build-system as runtime
|
||||
|
||||
# install temp-packageed python dependencies
|
||||
COPY --from=intermediate /temp-package/python /temp-package/python
|
||||
RUN pip install /temp-package/python/* && \
|
||||
rm -rf /temp-package
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ /app/
|
||||
<% if (copy_file) { print "COPY copied_files/* $copy_target"} %>
|
||||
<% add_files.each { print "COPY ${it.path} ${it.target}\n" } %>
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,31 +0,0 @@
|
||||
FROM ${buildRegistry}/build/python:3.10.12-${arch} as build-system
|
||||
|
||||
COPY ${modules_requirements_file} /app/${modules_requirements_file}
|
||||
|
||||
FROM build-system as intermediate
|
||||
# add credentials on build
|
||||
COPY id_github_jenkins /root/.ssh/id_rsa
|
||||
|
||||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
|
||||
chmod -R 600 /root/.ssh/
|
||||
|
||||
# temp-package python dependencies
|
||||
RUN pip download -r /app/requirements.txt -d /temp-package/python
|
||||
|
||||
### create the runtime image ###
|
||||
FROM build-system as runtime
|
||||
|
||||
# install temp-packageed python dependencies
|
||||
COPY --from=intermediate /temp-package/python /temp-package/python
|
||||
RUN pip install /temp-package/python/* && \
|
||||
rm -rf /temp-package && \
|
||||
pip install uwsgi && \
|
||||
python3 --version
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ /app/
|
||||
<% if (copy_file) { print "COPY copied_files/* $copy_target"} %>
|
||||
<% add_files.each { print "COPY ${it.path} ${it.target}\n" } %>
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,31 +0,0 @@
|
||||
FROM ${buildRegistry}/build/python:3.13-${arch} as build-system
|
||||
|
||||
COPY ${modules_requirements_file} /app/${modules_requirements_file}
|
||||
|
||||
FROM build-system as intermediate
|
||||
# add credentials on build
|
||||
COPY id_github_jenkins /root/.ssh/id_rsa
|
||||
|
||||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
|
||||
chmod -R 600 /root/.ssh/
|
||||
|
||||
# temp-package python dependencies
|
||||
RUN pip download -r /app/requirements.txt -d /temp-package/python
|
||||
|
||||
### create the runtime image ###
|
||||
FROM build-system as runtime
|
||||
|
||||
# install temp-packageed python dependencies
|
||||
COPY --from=intermediate /temp-package/python /temp-package/python
|
||||
RUN pip install /temp-package/python/* && \
|
||||
rm -rf /temp-package && \
|
||||
pip install uwsgi && \
|
||||
python3 --version
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ /app/
|
||||
<% if (copy_file) { print "COPY copied_files/* $copy_target"} %>
|
||||
<% add_files.each { print "COPY ${it.path} ${it.target}\n" } %>
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,29 +0,0 @@
|
||||
FROM ${buildRegistry}/build/python:3.7-${arch}-0.8.2 as build-system
|
||||
|
||||
COPY ${modules_requirements_file} /app/${modules_requirements_file}
|
||||
|
||||
FROM build-system as intermediate
|
||||
# add credentials on build
|
||||
COPY id_github_jenkins /root/.ssh/id_rsa
|
||||
|
||||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
|
||||
chmod -R 600 /root/.ssh/
|
||||
|
||||
# temp-package python dependencies
|
||||
RUN pip download -r /app/requirements.txt -d /temp-package/python
|
||||
|
||||
### create the runtime image ###
|
||||
FROM build-system as runtime
|
||||
|
||||
# install temp-packageed python dependencies
|
||||
COPY --from=intermediate /temp-package/python /temp-package/python
|
||||
RUN pip install /temp-package/python/* && \
|
||||
rm -rf /temp-package
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ /app/
|
||||
<% if (copy_file) { print "COPY copied_files/* $copy_target"} %>
|
||||
<% add_files.each { print "COPY ${it.path} ${it.target}\n" } %>
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
|
||||
app_name: ${app_name}
|
||||
app_port: ${app_port}
|
||||
health_check: ${health_check}
|
||||
module: module_less
|
||||
bu: ${bu}
|
||||
team: ${team}
|
||||
priority: ${priority}
|
||||
priority_v2: ${priority_v2}
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
replica_count: ${replica_count}
|
||||
environment:
|
||||
ftr:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
supervisord_config_path: /app/configurations/supervisord/supervisord.conf
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
stg:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
supervisord_config_path: /app/configurations/supervisord/supervisord.conf
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
int:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
supervisord_config_path: /app/configurations/supervisord/supervisord.conf
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
prd:
|
||||
as_enabled: ${as_enabled}
|
||||
as_min: ${as_min}
|
||||
as_max: ${as_max}
|
||||
supervisord_config_path: /app/configurations/supervisord/supervisord.conf
|
||||
cpu_limit: ${cpu_limit}
|
||||
cpu_request: ${cpu_request}
|
||||
memory_limit: ${memory_limit}
|
||||
memory_request: ${memory_request}
|
||||
deploymentStrategy: ${deploymentStrategy}
|
||||
appMetrics: ${appMetrics}
|
||||
deployment_args:
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${primary_port}\n progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
appType: ${dockerBuildVersion}
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: ${as_down_stable_window}
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
deployment:
|
||||
enabled: <% if (kind == "deployment" || kind == "Deployment") { print "true" } else { print "false" } %>
|
||||
updateStrategy:
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0%
|
||||
maxSurge: <% print "${maxSurge}%" %>
|
||||
type: RollingUpdate
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
env:
|
||||
- name: SUPERVISORD_CONFIG_FILE
|
||||
value: ${supervisord_config_path}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 60"} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 9901
|
||||
name: metric
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
replicaCount: ${replica_count}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
replicaCount: ${replica_count}
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: true
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
maxUnavailable: 100%
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: ${app_port}
|
||||
type: ClusterIP
|
||||
statefulset:
|
||||
enabled: <% if (kind == "statefulset" || kind == "StatefulSet" || kind == "statefulSet") { print "true" } else { print "false" } %>
|
||||
updateStrategy: <% if (statefulset.updateStrategy == "RollingUpdate" || statefulset.updateStrategy == "rollingUpdate" || statefulset.updateStrategy == "rollingupdate") { print "RollingUpdate" } else { print "null" } %>
|
||||
volumeType: ${statefulset.volumeType}
|
||||
<% if(statefulset.volumeType == "static" || statefulset.volumeType == "Static") { println " staticVolume:"; statefulset.staticVolume.each{k,v -> println " ${k}: ${v}"};} else {print " staticVolume:\n accessMode: ReadWriteMany\n mountPath: /opt/data\n size: 5Gi\n storageClass: homelab-gp2\n volumeHandle: fs-0e2a97a38b01857d1::fsap-07b146e3bc7aef280\n csiDriver: efs.csi.aws.com"} %>
|
||||
<% if(statefulset.volumeType == "dynamic" || statefulset.volumeType == "Dynamic") { println " dynamicVolume:"; statefulset.dynamicVolume.each{k,v -> println " ${k}: ${v}"};} else {print " dynamicVolume:\n accessMode: ReadWriteMany\n mountPath: /opt/data\n size: 5Gi\n storageClass: homelab-gp2"} %>
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
podtemplate:
|
||||
affinity: {}
|
||||
env:
|
||||
- name: SUPERVISORD_CONFIG_FILE
|
||||
value: ${supervisord_config_path}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 60"} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 9901
|
||||
name: metric
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
replicaCount: ${replica_count}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
serviceAccount:
|
||||
annotations: null
|
||||
enabled: false
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
@@ -1,58 +0,0 @@
|
||||
FROM ${buildRegistry}/build/rust:${version} AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
protobuf-compiler \
|
||||
cmake \
|
||||
libprotobuf-dev \
|
||||
libssl-dev \
|
||||
pkg-config \
|
||||
openssh-client \
|
||||
ca-certificates \
|
||||
libsasl2-2 \
|
||||
libsasl2-dev \
|
||||
clang \
|
||||
libclang-dev \
|
||||
<% build_packages.each { print " ${it} \\\n" } %>
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
COPY id_github_jenkins /root/.ssh/id_rsa
|
||||
|
||||
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts && \
|
||||
chmod -R 600 /root/.ssh/ && \
|
||||
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build release binary for the native architecture (amd64)
|
||||
RUN cargo build --workspace --release
|
||||
|
||||
# Clean up SSH key from builder stage for security
|
||||
RUN rm -rf /root/.ssh/
|
||||
|
||||
FROM asia-southeast1-docker.pkg.dev/homelab-devops-admin-0622/admin/build/debian:trixie-slim
|
||||
|
||||
# Install runtime dependencies if your app needs them (e.g., SSL)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libssl3t64 \
|
||||
ca-certificates \
|
||||
libsasl2-2 \
|
||||
<% runtime_packages.each { print " ${it} \\\n" } %>
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set workdir for the binary
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the compiled amd64 binary from the builder
|
||||
COPY --from=builder /usr/src/app/target/release/${binary_name} ./server
|
||||
<% add_files.each { print "COPY ${it.path} ${it.target}\n" } %>
|
||||
|
||||
# Expose port if your app listens on it
|
||||
EXPOSE 8080
|
||||
|
||||
# Start the application
|
||||
CMD ["./server"]
|
||||
@@ -1,206 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${(grpc_host || grpc_hosts) ? app_port : primary_port}\n progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>
|
||||
repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: ${as_down_stable_window}
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
replicaCount: ${replica_count}
|
||||
deployment:
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
<% if (deployment_args){println ' args:'; for (arg in deployment_args){ println ' - '+arg}} %>
|
||||
command:
|
||||
- ${command}
|
||||
enabled: true
|
||||
env:
|
||||
- name: GOMAXPROCS
|
||||
value: ${activeProcessorCount}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 120\n "} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (nodeSelector.contains("arm64") && (environment=="int" || environment=="prd")) { print 'telegraf.influxdata.com/image: 847438129436.dkr.ecr.ap-southeast-1.amazonaws.com/telegraf:1.24.4-arm64' } %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> println " ${k}: '${v}'"};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8880
|
||||
name: metric
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
# - effect: NoSchedule
|
||||
# key: kubernetes.io/arch
|
||||
# operator: Equal
|
||||
# value: arm64
|
||||
updateStrategy:
|
||||
strategy:
|
||||
<% if (deploymentStrategy == 'recreate') { print " type: Recreate"} else { print " type: RollingUpdate\n rollingUpdate:\n maxUnavailable: 0%\n maxSurge: ${maxSurge}%" } %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/server-snippet: |
|
||||
location ~* "^/api/1.0/search/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
location ~* "^/api/1.0/anonymous/search/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
location ~* "^/search-queries/recent" {
|
||||
default_type application/json;
|
||||
return 200 '{"recent_searches": [],"recent_suggestions": [],"limit": 5,"autosuggest_use_recent": true,"show_recent_header": false}';
|
||||
}
|
||||
<% if (ingress_annotations) {ingress_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: false
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: <% if (pdbMaxUnavailable) { print "true" } else { print "false" } %>
|
||||
maxUnavailable: ${pdbMaxUnavailable}
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
<% if (addon_ports) { for (p in addon_ports) { println " addons:"; println " - name: ${p.name}"; println " targetPort: ${p.targetPort}"; println " type: ${p.type}"; }} else { println " addon_ports: []" } %>
|
||||
<% if (grpc_port && app_port && (grpc_host || grpc_hosts)) {
|
||||
println " ports:"
|
||||
println " - name: http"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${app_port}"
|
||||
println " grpc_ports:"
|
||||
println " - name: grpc"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${grpc_port}"
|
||||
} else {
|
||||
println " ports:"
|
||||
println " - name: http"
|
||||
println " port: 80"
|
||||
println " protocol: TCP"
|
||||
println " targetPort: ${primary_port}"
|
||||
}
|
||||
%>
|
||||
type: ClusterIP
|
||||
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,202 +0,0 @@
|
||||
<% if (deploymentStrategy == 'canary'){ print "canary:\n enabled: true\n slackChannel: ${canary.slackChannel}\n enableManualPromotion: ${enableManualPromotion}\n skipAnalysis: ${canary.skipAnalysis}\n service:\n port: 80\n targetPort: ${primary_port}\n" ; print " progressDeadlineSeconds: ${canary.progressDeadlineSeconds}\n minCanaryReplicas: ${minCanaryReplicas}\n maxCanaryReplicas: ${maxCanaryReplicas}\n analysisInterval: ${canary.analysisInterval}\n analysisThreshold: ${canary.analysisThreshold}\n analysisMaxWeight: ${canary.analysisMaxWeight}\n analysisStepWeight: ${canary.analysisStepWeight}\n analysisMetrics:\n thresholdRangeMin: ${canary.analysisMetrics.thresholdRangeMin}\n interval: ${canary.analysisMetrics.interval}\n" } else { print "canary:\n enabled: false\n" } %>repoName: ${repo_name}
|
||||
cron:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
enabled: false
|
||||
applicationName: ${app_name}
|
||||
autoscaling:
|
||||
enabled: ${as_enabled}
|
||||
maxReplicas: ${as_max}
|
||||
minReplicas: ${as_min}
|
||||
pollingInterval: ${as_poll}
|
||||
scaledown:
|
||||
policies:
|
||||
- periodseconds: ${as_down_period}
|
||||
type: Pods
|
||||
value: ${as_down_pod_count}
|
||||
selectpolicy: Min
|
||||
stabilizationWindowSeconds: ${as_down_stable_window}
|
||||
scaleup:
|
||||
policies:
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Pods
|
||||
value: ${as_up_pod_count}
|
||||
- periodseconds: ${as_up_period}
|
||||
type: Percent
|
||||
value: ${as_up_pod_percentage}
|
||||
selectpolicy: Max
|
||||
stabilizationWindowSeconds: ${as_up_stable_window}
|
||||
<% if(!triggers){print " triggers:\n - metadata:\n value: \"${as_trigger_value}\"\n metricType: ${as_trigger_type}\n type: ${as_trigger_metric}"} else {println ' triggers:'; for(val in triggers){if(val instanceof Map){ val.each{k,v -> if (v instanceof Map) { println ' - '+k+':'; v.each{a,b -> if(b.isNumber()){println " ${a}: \"${b}\"" } else {println " ${a}: ${b}" }}} else {println" ${k}: ${v}"}}}}} %>
|
||||
replicaCount: ${replica_count}
|
||||
otel_enabled: ${otel_enabled}
|
||||
metrics_mode: ${metrics_mode}
|
||||
deployment:
|
||||
affinity: {}
|
||||
podDistributionSkew: ${podDistributionSkew}
|
||||
args:
|
||||
<% for (arg in deployment_args){ if (arg.contains("Xms") || arg.contains("Xmx")) {println ''} else {println ' - '+arg}} %>
|
||||
<% if (appConfigEnabled) { %>- -Dspring.profiles.active=${environment},${app_name},dyn-${environment} <% } %>
|
||||
<% if (appConfigEnabled) { %>- -Dspring.config.additional-location=/opt/config/application-${environment}.yml,/opt/config/application-dyn-${environment}.yml<% } %>
|
||||
- -Xms${xms}
|
||||
- -Xmx${xmx}
|
||||
- -XX:ActiveProcessorCount=${activeProcessorCount}
|
||||
- -javaagent:/opt/jmx_exporter.jar=8880:/jmx/jmx-config.yaml
|
||||
<% if (telegraf_metrics) { %>- -Dtelegraf-metrics-enabled=true<% } else { %>- -Dtelegraf-metrics-enabled=false<% } %>
|
||||
<% if (otel_enabled) { %>
|
||||
- -javaagent:/opt/opentelemetry-javaagent.jar
|
||||
- -Dotel.exporter.otlp.protocol=grpc
|
||||
- -Dotel.logs.exporter=none
|
||||
- -Dotel.metrics.exporter=none
|
||||
- -Dotel.traces.exporter=otlp
|
||||
- -Dotel.traces.sampler=traceidratio
|
||||
<% if (environment != "stg") { %>
|
||||
- -Dotel.traces.sampler.arg=${otel_traces_sampler_arg}
|
||||
<% } %>
|
||||
- -Dotel.resource.attributes=service.name=${app_name},application.name=${app_name},api.name=${app_name},cx.application.name=${app_name},cx.subsystem.name=${app_name}
|
||||
<% } %>
|
||||
- -jar
|
||||
- <% print module=='module_less'?repo_name:module %>.jar
|
||||
command:
|
||||
- java
|
||||
enabled: true
|
||||
env:
|
||||
- name: PRISMSDK_ENVIRONMENT
|
||||
value: ${prismsdk_environment}
|
||||
envFrom:
|
||||
secretRef: ${app_name}
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecret: ""
|
||||
repository: ${registry}/${environment}/${build_team}/<% print module=='module_less'?repo_name.toLowerCase():repo_name.toLowerCase()+'/'+module %>
|
||||
tag: ${tag}
|
||||
<% if(lifecycle) { println ' lifecycle:\n preStop:\n exec:\n command:'; for(val in lifecycle.preStop.exec.command){ println " - $val" }} else {print " lifecycle:\n preStop:\n exec:\n command:\n - /bin/bash\n - -c\n - kill -SIGQUIT 1 ; /bin/sleep 120\n "} %>
|
||||
minReadySeconds: 10
|
||||
podAnnotations:
|
||||
jmx.io/path: /metrics
|
||||
jmx.io/port: "8880"
|
||||
jmx.io/scrape: "true"
|
||||
<% if (nodeSelector.contains("arm64") && (environment=="int" || environment=="prd")) { print 'telegraf.influxdata.com/image: 847438129436.dkr.ecr.ap-southeast-1.amazonaws.com/telegraf:1.24.4-arm64' } %>
|
||||
<% if (appMetrics) { print 'prometheus.io/path: /actuator/prometheus' %>
|
||||
<% print 'prometheus.io/port: "'+app_port+'"' %>
|
||||
<% print 'prometheus.io/scrape: "true"'} %>
|
||||
<% if (pod_annotations) {pod_annotations.each{k,v -> if(v instanceof String) { println " ${k}: '${v}'"} else { println " ${k}: ${v}" }};} else {print ''} %>
|
||||
ports:
|
||||
- containerPort: ${app_port}
|
||||
name: http
|
||||
protocol: TCP
|
||||
- containerPort: 8880
|
||||
name: metric
|
||||
protocol: TCP
|
||||
probes:
|
||||
liveness:
|
||||
failureThreshold: ${liveness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${liveness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${liveness_success_threshold}
|
||||
timeoutSeconds: ${liveness_timeout_seconds}
|
||||
readiness:
|
||||
failureThreshold: ${readiness_failure_threshold}
|
||||
initialDelaySeconds: ${initialDelaySeconds}
|
||||
path: ${health_check}
|
||||
periodSeconds: ${readiness_period_seconds}
|
||||
port: http
|
||||
scheme: HTTP
|
||||
successThreshold: ${readiness_success_threshold}
|
||||
timeoutSeconds: ${readiness_timeout_seconds}
|
||||
resources:
|
||||
limits:
|
||||
cpu: ${cpu_limit}
|
||||
memory: ${memory_limit}i
|
||||
requests:
|
||||
cpu: ${cpu_request}
|
||||
memory: ${memory_request}i
|
||||
revisionHistoryLimit: 6
|
||||
<% if(serviceAccount){println ' serviceAccount:\n annotations:';serviceAccount.annotations.each{k,v -> println " ${k}: ${v}"};println " enabled: ${serviceAccount.enabled}"} else {print ' serviceAccount:\n annotations: null\n enabled: false'} %>
|
||||
nodeSelector:
|
||||
${nodeSelector}: ${nodeSelectorValue}
|
||||
<% if (hostAliases){println ' hostAliases:';for(arr in hostAliases){println ' - ip: '+arr.get("ip"); println ' hostnames:'; for (ele in arr.get("hostnames")) { println ' - '+ele } }} %>
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
key: ${nodeSelector}
|
||||
operator: Equal
|
||||
value: ${nodeSelectorValue}
|
||||
updateStrategy:
|
||||
strategy:
|
||||
<% if (deploymentStrategy == 'recreate') { print " type: Recreate"} else { print " type: RollingUpdate\n rollingUpdate:\n maxUnavailable: 0%\n maxSurge: ${maxSurge}%" } %>
|
||||
externalSecret:
|
||||
annotations:
|
||||
<% if (external_secrets_annotations) {external_secrets_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
path: homelab/${vault_env}/${bu}/${team}/${app_name}
|
||||
version: ${tag}
|
||||
name: ${env_ns}-${app_name}
|
||||
target: ${app_name}
|
||||
fullnameOverride: ""
|
||||
ingress:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
<% if (ingress_annotations) {ingress_annotations.each{k,v -> println " ${k}: ${v}"};} else {print ''} %>
|
||||
enabled: true
|
||||
<% if(grpc_host){println " grpc_hosts:\n - host: ${grpc_host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else if (grpc_hosts) {println " grpc_hosts:";for(host_arr in grpc_hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %>
|
||||
<% if(host){println " hosts:\n - host: ${host}\n paths:\n - pathType: ImplementationSpecific\n path: /"} else {println " hosts:";for(host_arr in hosts){println " - host: ${host_arr.host}\n paths:";for(path_arr in host_arr.paths){println " - pathType: ${path_arr.pathType}\n path: ${path_arr.path}"; if(path_arr.targetService) { println " targetService: ${path_arr.targetService}" } }}} %> ingressClassName: ${ingress_class}
|
||||
servicePort: http
|
||||
enableWebsocket: ${enableWebsocket}
|
||||
slowStart:
|
||||
enabled: <% if (slowStartWindow) { print "true" } else { print "false" } %>
|
||||
window: <% if (slowStartWindow) { print "${slowStartWindow}" } else { print "120s" } %>
|
||||
aggression: <% if (slowStartAggression) { print "${slowStartAggression}" } else { print "1.0" } %>
|
||||
minPercent: <% if (slowStartMinPercent) { print "${slowStartMinPercent}" } else { print "10" } %>
|
||||
jmxconfig:
|
||||
enabled: true
|
||||
labels:
|
||||
priority: <% print priority?:'p1' %>
|
||||
priority_v2: <% print priority_v2?:'cp3' %>
|
||||
primary_owner: ${primary_owner}
|
||||
secondary_owner: ${secondary_owner}
|
||||
env: ${environment_norm}
|
||||
team: ${team_norm}
|
||||
bu: ${bu_norm}
|
||||
<% if (service_type_norm) { println "service_type: ${service_type_norm}" } %>
|
||||
commit_id: ${commit_id}
|
||||
nameOverride: ""
|
||||
namespace: ${env_ns}-${app_name}
|
||||
podDisruptionBudget:
|
||||
enabled: <% if (pdbMaxUnavailable) { print "true" } else { print "false" } %>
|
||||
maxUnavailable: ${pdbMaxUnavailable}
|
||||
minAvailable: ${pdbMinAvailable}
|
||||
podSecurityContext:
|
||||
fsGroup: 65534
|
||||
runAsGroup: 65534
|
||||
runAsUser: 65534
|
||||
service:
|
||||
<% if (service_annotations) { println " annotations:"; service_annotations.each{k,v -> println " ${k}: \"${v}\""};} else { println " annotations: null" } %>
|
||||
enabled: true
|
||||
<% if (addon_ports) { for (p in addon_ports) { println " addons:"; println " - name: ${p.name}"; println " targetPort: ${p.targetPort}"; println " type: ${p.type}"; }} else { println " addon_ports: []" } %>
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: ${primary_port}
|
||||
type: ClusterIP
|
||||
|
||||
createContourGateway: <% if (createContourGateway) { print "${createContourGateway}" } else { print "false" } %>
|
||||
contourResponseTimeout: ${contourResponseTimeout}
|
||||
|
||||
|
||||
appConfig:
|
||||
enabled: <% if(appConfigEnabled) { print "true" } else { print "false"} %>
|
||||
env: ${environment}
|
||||
<% if(appConfigEnabled) {%>
|
||||
staticAppConfig:
|
||||
data: |
|
||||
${staticAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
dynamicAppConfig:
|
||||
data: |
|
||||
${dynamicAppConfigData.trim().replaceAll("(?m)^", " ")}
|
||||
<% }
|
||||
%>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
|
||||
as_poll: ${as_poll}
|
||||
as_down_period: ${as_down_period}
|
||||
as_up_period: ${as_up_period}
|
||||
as_up_stable_window: ${as_up_stable_window}
|
||||
ingress_class: ${ingress_class}
|
||||
host: ${host}
|
||||
hostAliases: false
|
||||
nodeSelector: <% if(arch == 'arm64'){print environment=='dev' || environment=='ftr' ? bu+'-'+arch: environment == 'int' ? team+"-"+arch:nodeSelector } else { print environment == 'dev' || environment == 'ftr' ? bu: environment == 'int' ? bu+"-int" : nodeSelector} %>
|
||||
triggers:
|
||||
- metadata:
|
||||
value: "${as_trigger_value}"
|
||||
metricType: ${as_trigger_type}
|
||||
type: ${as_trigger_metric}
|
||||
canary:
|
||||
progressDeadlineSeconds: 300
|
||||
analysisInterval: 120s
|
||||
analysisThreshold: 5
|
||||
analysisMaxWeight: 5
|
||||
analysisStepWeight: 5
|
||||
analysisMetrics:
|
||||
thresholdRangeMin: 0.99
|
||||
interval: 1m
|
||||
skipAnalysis: false
|
||||
Reference in New Issue
Block a user