# Default values for web-application chart
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# Number of replicas for the deployment
replicaCount: 2

image:
  # Docker image repository
  repository: nginx
  # Image pull policy
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion
  tag: "1.25.0-alpine"

# Image pull secrets for private registries
imagePullSecrets: []
# - name: myregistrykey

# Override the default name
nameOverride: ""
# Override the full name
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # Annotations to add to the service account
  annotations: {}
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""
  # Automatically mount a ServiceAccount's API credentials
  automountServiceAccountToken: false

# Pod annotations
podAnnotations: {}

# Pod labels
podLabels: {}

# Pod security context
podSecurityContext:
  runAsNonRoot: true
  runAsUser: 1000
  fsGroup: 1000
  seccompProfile:
    type: RuntimeDefault

# Container security context
securityContext:
  allowPrivilegeEscalation: false
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000

service:
  # Service type (ClusterIP, NodePort, LoadBalancer)
  type: ClusterIP
  # Service port
  port: 80
  # Container port
  targetPort: 8080
  # Optional: NodePort for NodePort service type
  # nodePort: 30080
  # Service annotations
  annotations: {}

ingress:
  # Enable ingress
  enabled: false
  # Ingress class name (nginx, traefik, etc.)
  className: "nginx"
  # Ingress annotations
  annotations: {}
    # cert-manager.io/cluster-issuer: letsencrypt-prod
    # nginx.ingress.kubernetes.io/ssl-redirect: "true"
    # nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  hosts:
    - host: chart-example.local
      paths:
        - path: /
          pathType: Prefix
  # TLS configuration
  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

# Resource limits and requests
resources:
  limits:
    cpu: 200m
    memory: 256Mi
  requests:
    cpu: 100m
    memory: 128Mi

# Liveness probe configuration
livenessProbe:
  httpGet:
    path: /healthz
    port: http
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 5
  successThreshold: 1
  failureThreshold: 3

# Readiness probe configuration
readinessProbe:
  httpGet:
    path: /ready
    port: http
  initialDelaySeconds: 10
  periodSeconds: 5
  timeoutSeconds: 3
  successThreshold: 1
  failureThreshold: 3

# Horizontal Pod Autoscaler
autoscaling:
  enabled: false
  minReplicas: 2
  maxReplicas: 10
  targetCPUUtilizationPercentage: 80
  targetMemoryUtilizationPercentage: 80

# Pod Disruption Budget
podDisruptionBudget:
  enabled: false
  minAvailable: 1
  # maxUnavailable: 1

# Node selector
nodeSelector: {}

# Tolerations
tolerations: []

# Affinity rules
affinity: {}

# Environment variables
env: []
# - name: ENV_VAR_NAME
#   value: "value"

# Environment variables from ConfigMap
envFrom: []
# - configMapRef:
#     name: my-configmap

# Extra volumes
volumes: []
# - name: cache
#   emptyDir: {}

# Extra volume mounts
volumeMounts: []
# - name: cache
#   mountPath: /app/cache

# ConfigMap data
configMap:
  enabled: false
  data: {}
  # key: value

# Init containers
initContainers: []
# - name: init-myservice
#   image: busybox:1.36
#   command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done;']

# Sidecar containers
sidecars: []
# - name: log-forwarder
#   image: fluent/fluent-bit:2.0
#   volumeMounts:
#   - name: logs
#     mountPath: /var/log

# Network Policy
networkPolicy:
  enabled: false
  policyTypes:
    - Ingress
    - Egress
  ingress: []
  egress: []

# Priority class name
priorityClassName: ""

# Topology spread constraints
topologySpreadConstraints: []
# - maxSkew: 1
#   topologyKey: topology.kubernetes.io/zone
#   whenUnsatisfiable: DoNotSchedule
#   labelSelector:
#     matchLabels:
#       app: myapp
