Skip to content

Commit 6d49524

Browse files
committed
added test values.yaml
1 parent 89e60d8 commit 6d49524

File tree

1 file changed

+228
-7
lines changed

1 file changed

+228
-7
lines changed

scripts/devtron-reference-helm-charts/deployment-chart_4-20-0/test_values.yaml

Lines changed: 228 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -769,14 +769,235 @@ affinity:
769769
topologyKey: topology.kubernetes.io/zone
770770

771771
secondaryWorkload:
772-
enabled: false
773-
postfix: "od"
772+
enabled: true
773+
postfix: "sec" # Default postfix for secondary workload resources
774+
fullnameOverride: "" # Override the full name of secondary workload resources
775+
776+
# Replica configuration
774777
replicaCount: 1
775-
affinity: {}
776-
tolerations: []
778+
779+
# Deployment configuration
780+
deploymentLabels:
781+
environment: "production"
782+
team: "backend"
783+
component: "secondary"
784+
785+
deploymentAnnotations:
786+
deployment.kubernetes.io/revision: "1"
787+
example.com/deployment-type: "secondary"
788+
789+
# Pod configuration
790+
podLabels:
791+
workload: "secondary"
792+
version: "v2"
793+
794+
podAnnotations:
795+
sidecar.istio.io/inject: "true"
796+
prometheus.io/scrape: "true"
797+
798+
# Custom match labels for deployment selector
799+
customMatchLabels:
800+
app: "my-secondary-app"
801+
version: "v2"
802+
803+
# Custom pod labels for service selector
804+
customPodLabels:
805+
app: "my-secondary-app"
806+
tier: "backend"
807+
808+
# Container configuration
809+
containerName: "secondary-container" # Custom container name
810+
ContainerPort: # Optional, inherits from primary if not specified
811+
- name: http
812+
port: 8080
813+
servicePort: 80
814+
targetPort: 8080
815+
- name: metrics
816+
port: 9090
817+
servicePort: 9090
818+
819+
# Affinity and tolerations
820+
affinity:
821+
podAntiAffinity:
822+
requiredDuringSchedulingIgnoredDuringExecution:
823+
- labelSelector:
824+
matchExpressions:
825+
- key: workload
826+
operator: In
827+
values:
828+
- primary
829+
topologyKey: kubernetes.io/hostname
830+
831+
tolerations:
832+
- key: "secondary-workload"
833+
operator: "Equal"
834+
value: "true"
835+
effect: "NoSchedule"
836+
837+
# Autoscaling configuration
777838
autoscaling:
778839
enabled: true
779840
MinReplicas: 1
780-
MaxReplicas: 2
781-
TargetCPUUtilizationPercentage: 90
782-
TargetMemoryUtilizationPercentage: 80
841+
MaxReplicas: 5
842+
TargetCPUUtilizationPercentage: 70
843+
TargetMemoryUtilizationPercentage: 80
844+
behavior:
845+
scaleDown:
846+
stabilizationWindowSeconds: 300
847+
policies:
848+
- type: Percent
849+
value: 50
850+
periodSeconds: 60
851+
scaleUp:
852+
stabilizationWindowSeconds: 60
853+
policies:
854+
- type: Percent
855+
value: 100
856+
periodSeconds: 15
857+
extraMetrics:
858+
- type: Resource
859+
resource:
860+
name: memory
861+
target:
862+
type: Utilization
863+
averageUtilization: 80
864+
865+
# KEDA Autoscaling configuration
866+
kedaAutoscaling:
867+
enabled: true
868+
inherit: false # Set to true to inherit all KEDA config from primary workload
869+
name: "secondary-workload-keda"
870+
envSourceContainerName: "secondary-container"
871+
cooldownPeriod: 300
872+
minReplicaCount: 1
873+
maxReplicaCount: 10
874+
idleReplicaCount: 0
875+
pollingInterval: 30
876+
labels:
877+
keda.component: "secondary"
878+
annotations:
879+
keda.autoscaler: "custom"
880+
fallback:
881+
failureThreshold: 3
882+
replicas: 2
883+
advanced:
884+
restoreToOriginalReplicaCount: true
885+
horizontalPodAutoscalerConfig:
886+
behavior:
887+
scaleDown:
888+
stabilizationWindowSeconds: 300
889+
triggers:
890+
- type: prometheus
891+
name: secondary_cpu_usage
892+
metadata:
893+
serverAddress: http://prometheus:9090
894+
metricName: cpu_usage_secondary
895+
threshold: '70'
896+
query: avg(cpu_usage{workload="secondary"})
897+
authenticationRef:
898+
name: keda-trigger-auth-prometheus
899+
triggerAuthentication:
900+
enabled: true
901+
name: "secondary-trigger-auth"
902+
spec:
903+
secretTargetRef:
904+
- parameter: username
905+
name: prometheus-secret
906+
key: username
907+
- parameter: password
908+
name: prometheus-secret
909+
key: password
910+
911+
# Service configuration
912+
service:
913+
enabled: true
914+
type: ClusterIP # Can be ClusterIP, NodePort, LoadBalancer
915+
annotations:
916+
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
917+
example.com/service-type: "secondary"
918+
extraSpec:
919+
sessionAffinity: ClientIP
920+
loadBalancerIP: "" # For LoadBalancer type
921+
loadBalancerSourceRanges: [] # For LoadBalancer type
922+
sessionAffinity:
923+
enabled: true
924+
sessionAffinityConfig:
925+
clientIP:
926+
timeoutSeconds: 10800
927+
928+
# Istio configuration
929+
istio:
930+
virtualService:
931+
enabled: true
932+
name: "secondary-workload-vs"
933+
labels:
934+
istio.component: "secondary"
935+
annotations:
936+
istio.io/description: "Secondary workload virtual service"
937+
gateways:
938+
- istio-system/secondary-gateway
939+
hosts:
940+
- "secondary-api.example.com"
941+
- "api-v2.example.com"
942+
http:
943+
- match:
944+
- uri:
945+
prefix: "/api/v2"
946+
- headers:
947+
version:
948+
exact: "v2"
949+
route:
950+
- destination:
951+
host: "secondary-workload-service.default.svc.cluster.local"
952+
port:
953+
number: 80
954+
timeout: 30s
955+
retries:
956+
attempts: 3
957+
perTryTimeout: 10s
958+
retryOn: "5xx,reset,connect-failure,refused-stream"
959+
headers:
960+
request:
961+
set:
962+
x-workload-version: "v2"
963+
response:
964+
set:
965+
x-served-by: "secondary-workload"
966+
967+
destinationRule:
968+
enabled: true
969+
name: "secondary-workload-dr"
970+
labels:
971+
istio.component: "secondary"
972+
annotations:
973+
istio.io/description: "Secondary workload destination rule"
974+
subsets:
975+
- name: v2
976+
labels:
977+
version: v2
978+
- name: canary
979+
labels:
980+
track: canary
981+
trafficPolicy:
982+
loadBalancer:
983+
simple: LEAST_CONN
984+
connectionPool:
985+
tcp:
986+
maxConnections: 100
987+
http:
988+
http1MaxPendingRequests: 50
989+
maxRequestsPerConnection: 10
990+
circuitBreaker:
991+
consecutiveErrors: 3
992+
interval: 30s
993+
baseEjectionTime: 30s
994+
outlierDetection:
995+
consecutive5xxErrors: 3
996+
interval: 30s
997+
baseEjectionTime: 30s
998+
999+
# User-friendly configuration fields
1000+
virtualServiceName: "my-secondary-vs" # Direct VirtualService name input
1001+
virtualServiceHosts: # Direct hosts input
1002+
- "secondary.myapp.com"
1003+
- "v2.myapp.com"

0 commit comments

Comments
 (0)