Renames src/com/meesho -> src/com/homelab, resources/com/meesho -> resources/com/homelab, resources/org/meesho -> resources/org/homelab (via git mv, preserving history), and sweeps every remaining occurrence of "meesho" (any casing) out of package declarations, imports, libraryResource() paths, and comments across the whole repo. Also drops the per-user allowlist in vars/eksCICD.groovy, which hardcoded real former-colleagues' emails and doesn't apply to a single-person homelab — that branch is now permanently skipped rather than deleted outright, to avoid hand-editing the escape-sequence-heavy echo blocks it guards (eksCICD.groovy itself is unused legacy code, not called by homelabPipeline.groovy). Does not touch the ~114 files that were already missing from the working tree but still tracked in the prior commit — that's unrelated pre-existing state, left as-is.
207 lines
10 KiB
YAML
207 lines
10 KiB
YAML
<% 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)^", " ")}
|
|
<% }
|
|
%>
|