UNCLASSIFIED

values.yaml 18 KB
Newer Older
michaelmcleroy's avatar
michaelmcleroy committed
1 2 3 4 5 6 7 8 9 10 11
# Optionally override the fully qualified name
fullnameOverride: ""

# Optionally override the name
nameOverride: ""

# The number of replicas to create (has no effect if autoscaling enabled)
replicas: 1

image:
  # The Keycloak image repository
megamind's avatar
megamind committed
12
  repository: registry.dso.mil/platform-one/big-bang/apps/security-tools/keycloak/keycloak-ib
michaelmcleroy's avatar
michaelmcleroy committed
13
  # Overrides the Keycloak image tag whose default is the chart version
14
  tag: "14.0.0-1.0.6-1"
michaelmcleroy's avatar
michaelmcleroy committed
15 16 17 18 19
  # The Keycloak image pull policy
  pullPolicy: IfNotPresent

# Image pull secrets for the Pod
imagePullSecrets: []
kevin.wilder's avatar
kevin.wilder committed
20
# - name: private-registry
michaelmcleroy's avatar
michaelmcleroy committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

# Mapping between IPs and hostnames that will be injected as entries in the Pod's hosts files
hostAliases: []
# - ip: "1.2.3.4"
#   hostnames:
#     - "my.host.com"

# Indicates whether information about services should be injected into Pod's environment variables, matching the syntax of Docker links
enableServiceLinks: true

# Pod management policy. One of `Parallel` or `OrderedReady`
podManagementPolicy: Parallel

# Pod restart policy. One of `Always`, `OnFailure`, or `Never`
restartPolicy: Always

serviceAccount:
  # Specifies whether a ServiceAccount should be created
  create: true
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""
  # Additional annotations for the ServiceAccount
  annotations: {}
  # Additional labels for the ServiceAccount
  labels: {}
  # Image pull secrets that are attached to the ServiceAccount
  imagePullSecrets: []

rbac:
  create: false
  rules: []
  # RBAC rules for KUBE_PING
  #  - apiGroups:
  #      - ""
  #    resources:
  #      - pods
  #    verbs:
  #      - get
  #      - list

# SecurityContext for the entire Pod. Every container running in the Pod will inherit this SecurityContext. This might be relevant when other components of the environment inject additional containers into running Pods (service meshes are the most prominent example for this)
podSecurityContext:
  fsGroup: 1000

# SecurityContext for the Keycloak container
securityContext:
  runAsUser: 1000
  runAsNonRoot: true

# Additional init containers, e. g. for providing custom themes
extraInitContainers: ""

# Additional sidecar containers, e. g. for a database proxy, such as Google's cloudsql-proxy
extraContainers: ""

# Lifecycle hooks for the Keycloak container
78
lifecycleHooks: ""
michaelmcleroy's avatar
michaelmcleroy committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
#  postStart:
#    exec:
#      command:
#        - /bin/sh
#        - -c
#        - ls

# Termination grace period in seconds for Keycloak shutdown. Clusters with a large cache might need to extend this to give Infinispan more time to rebalance
terminationGracePeriodSeconds: 60

# The internal Kubernetes cluster domain
clusterDomain: cluster.local

## Overrides the default entrypoint of the Keycloak container
command: []

## Overrides the default args for the Keycloak container
96
args:
97
  # Big Bang additions 
98
  - "-b 0.0.0.0"
99 100
  - "-Dkeycloak.profile.feature.admin_fine_grained_authz=enabled"
  - "-Dkeycloak.profile.feature.declarative_user_profile=enabled"
michaelmcleroy's avatar
michaelmcleroy committed
101 102

# Additional environment variables for Keycloak
103 104 105 106 107 108 109 110 111
extraEnv: ""
  # - name: KEYCLOAK_LOGLEVEL
  #   value: DEBUG
  # - name: WILDFLY_LOGLEVEL
  #   value: DEBUG
  # - name: CACHE_OWNERS_COUNT
  #   value: "2"
  # - name: CACHE_OWNERS_AUTH_SESSIONS_COUNT
  #   value: "2"
michaelmcleroy's avatar
michaelmcleroy committed
112 113

# Additional environment variables for Keycloak mapped from Secret or ConfigMap
114 115 116 117 118
#### Updated for Big Bang ####
extraEnvFrom: |
  - secretRef:
      name: '{{ include "keycloak.fullname" . }}-env'

michaelmcleroy's avatar
michaelmcleroy committed
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161

#  Pod priority class name
priorityClassName: ""

# Pod affinity
affinity: |
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            {{- include "keycloak.selectorLabels" . | nindent 10 }}
          matchExpressions:
            - key: app.kubernetes.io/component
              operator: NotIn
              values:
                - test
        topologyKey: kubernetes.io/hostname
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchLabels:
              {{- include "keycloak.selectorLabels" . | nindent 12 }}
            matchExpressions:
              - key: app.kubernetes.io/component
                operator: NotIn
                values:
                  - test
          topologyKey: failure-domain.beta.kubernetes.io/zone

# Node labels for Pod assignment
nodeSelector: {}

# Node taints to tolerate
tolerations: []

# Additional Pod labels
podLabels: {}

# Additional Pod annotations
podAnnotations: {}

# Liveness probe configuration
162
#### Updated for Big Bang ####
michaelmcleroy's avatar
michaelmcleroy committed
163 164
livenessProbe: |
  httpGet:
165
    path: /auth/realms/master
kevin.wilder's avatar
kevin.wilder committed
166 167
    port: http
    scheme: HTTP
168
  failureThreshold: 15
169
  timeoutSeconds: 2
170
  periodSeconds: 15
michaelmcleroy's avatar
michaelmcleroy committed
171 172

# Readiness probe configuration
173
#### Updated for Big Bang ####
michaelmcleroy's avatar
michaelmcleroy committed
174 175 176
readinessProbe: |
  httpGet:
    path: /auth/realms/master
kevin.wilder's avatar
kevin.wilder committed
177 178
    port: http
    scheme: HTTP
179 180
  failureThreshold: 15
  timeoutSeconds: 2
michaelmcleroy's avatar
michaelmcleroy committed
181

182 183 184 185 186 187 188 189 190 191 192
# Startup probe configuration
#### Updated for Big Bang ####
startupProbe: |
  httpGet:
    path: /auth/realms/master
    port: http
  initialDelaySeconds: 90
  timeoutSeconds: 2
  failureThreshold: 60
  periodSeconds: 5

michaelmcleroy's avatar
michaelmcleroy committed
193
# Pod resource requests and limits
Ernest Chuang's avatar
Ernest Chuang committed
194
resources: 
195 196 197 198 199 200
  requests:
    cpu: "500m"
    memory: "1024Mi"
  limits:
    cpu: "500m"
    memory: "1024Mi"
michaelmcleroy's avatar
michaelmcleroy committed
201

202 203
#### starupScripts removed to discourange use in Big Bang ####

michaelmcleroy's avatar
michaelmcleroy committed
204
# Add additional volumes, e. g. for custom themes
205
extraVolumes: ""
206 207

#### added by Big Bang ####
208
# This values key is reserved for integration with BigBang chart
209
extraVolumesBigBang: {}
michaelmcleroy's avatar
michaelmcleroy committed
210 211

# Add additional volumes mounts, e. g. for custom themes
212
extraVolumeMounts: ""
213 214

#### added by Big Bang ####
215
# This values key is reserved for integration with BigBang chart
216
extraVolumeMountsBigBang: {}
michaelmcleroy's avatar
michaelmcleroy committed
217 218

# Add additional ports, e. g. for admin console or exposing JGroups ports
219 220 221 222 223
extraPorts:
  #### Big Bang Addition ####
  - name: jgroup
    containerPort: 7600
    protocol: TCP
michaelmcleroy's avatar
michaelmcleroy committed
224 225 226 227 228 229 230 231 232 233 234 235 236

# Pod disruption budget
podDisruptionBudget: {}
#  maxUnavailable: 1
#  minAvailable: 1

# Annotations for the StatefulSet
statefulsetAnnotations: {}

# Additional labels for the StatefulSet
statefulsetLabels: {}

# Configuration for secrets that should be created
237 238
## The secrets can also be independently created separate from this helm chart.
## for examlpe with a gitops tool like flux with a kustomize overlay.
239
secrets:
michaelmcleroy's avatar
michaelmcleroy committed
240 241 242 243 244 245
  # mysecret:
  #   type: {}
  #   annotations: {}
  #   labels: {}
  #   stringData: {}
  #   data: {}
246
  #### Added for Big Bang ####
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
  # Environmental variables
  env:
    stringData:
      JAVA_TOOL_OPTIONS: "-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"

      # Credentials to setup for default admin user.
      KEYCLOAK_USER: "{{ .Values.secrets.credentials.stringData.adminuser }}"
      KEYCLOAK_PASSWORD: "{{ .Values.secrets.credentials.stringData.password }}"

      # See https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#running-keycloak-behind-a-reverse-proxy
      PROXY_ADDRESS_FORWARDING: "true"

      # For HA/Clustering.  See https://github.com/codecentric/helm-charts/tree/master/charts/keycloak#high-availability-and-clustering
      JGROUPS_DISCOVERY_PROTOCOL: dns.DNS_PING
      JGROUPS_DISCOVERY_PROPERTIES: 'dns_query={{ include "keycloak.serviceDnsName" . }}'
      KEYCLOAK_SERVICE_DNS_NAME: '{{ include "keycloak.serviceDnsName" . }}'
      CACHE_OWNERS_COUNT: "2"
      CACHE_OWNERS_AUTH_SESSIONS_COUNT: "2"

      # Enable Prometheus metrics to be produced
      KEYCLOAK_STATISTICS: "{{ if .Values.serviceMonitor.enabled }}all{{ end }}"

      # Example custom registration
      # CUSTOM_REGISTRATION_CONFIG: "/opt/jboss/keycloak/customreg.yaml"

      # Example custom realm
      # KEYCLOAK_IMPORT: "/opt/jboss/keycloak/realm.json"

      # Example custom certificate authorities
      # X509_CA_BUNDLE: "/etc/x509/https/cas.pem"

278 279 280 281 282
  # Default admin user credentials
  credentials:
    stringData:
      adminuser: admin
      password: password
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309

  # Example inline TLS certificates
  # tlscert:
  #   stringData:
  #     tls.crt: ""
  # tlskey:
  #   stringData:
  #     tls.key: ""
  # certauthority:
  #   stringData
  #     cas.pem: ""

  # Example inline custom registration configuration
  # See docs/configuration.md for info about how to create this secret in operational deployments
  # Using this chart value to create the secret should only be used for development and pipeline tests
  # See tests/test-values.yml for development example
  # customreg:
  #   stringData:
  #     customreg.yaml: ""

  # Example inline custom realm configuration
  # See docs/configuration.md for info about how to create this secret in operational deployments
  # Using this chart to create the secret should only be used for development and pipeline tests
  # See tests/test-values.yml for development example
  # realm:
  #   stringData:
  #     realm.json: ""
michaelmcleroy's avatar
michaelmcleroy committed
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333

service:
  # Annotations for headless and HTTP Services
  annotations: {}
  # Additional labels for headless and HTTP Services
  labels: {}
  # key: value
  # The Service type
  type: ClusterIP
  # Optional IP for the load balancer. Used for services of type LoadBalancer only
  loadBalancerIP: ""
  # The http Service port
  httpPort: 80
  # The HTTP Service node port if type is NodePort
  httpNodePort: null
  # The HTTPS Service port
  httpsPort: 8443
  # The HTTPS Service node port if type is NodePort
  httpsNodePort: null
  # The WildFly management Service port
  httpManagementPort: 9990
  # The WildFly management Service node port if type is NodePort
  httpManagementNodePort: null
  # Additional Service ports, e. g. for custom admin console
334 335 336 337 338
  #### Added for Big Bang ####
  extraPorts:
  - name: jgroup
    port: 7600
    targetPort: jgroup
kevin.wilder's avatar
kevin.wilder committed
339
    protocol: TCP
michaelmcleroy's avatar
michaelmcleroy committed
340 341 342 343
  # When using Service type LoadBalancer, you can restrict source ranges allowed
  # to connect to the LoadBalancer, e. g. will result in Security Groups
  # (or equivalent) with inbound source ranges allowed to connect
  loadBalancerSourceRanges: []
344 345 346 347
  # When using Service type LoadBalancer, you can preserve the source IP seen in the container
  # by changing the default (Cluster) to be Local.
  # See https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
  externalTrafficPolicy: "Cluster"
michaelmcleroy's avatar
michaelmcleroy committed
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430
  # Session affinity
  # See https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-userspace
  sessionAffinity: ""
  # Session affinity config
  sessionAffinityConfig: {}

ingress:
  # If `true`, an Ingress is created
  enabled: false
  # The Service port targeted by the Ingress
  servicePort: http
  # Ingress annotations
  annotations: {}
    ## Resolve HTTP 502 error using ingress-nginx:
    ## See https://www.ibm.com/support/pages/502-error-ingress-keycloak-response
    # nginx.ingress.kubernetes.io/proxy-buffer-size: 128k

  # Additional Ingress labels
  labels: {}
   # List of rules for the Ingress
  rules:
    -
      # Ingress host
      host: '{{ .Release.Name }}.keycloak.example.com'
      # Paths for the host
      paths:
        - /
  # TLS configuration
  tls:
    - hosts:
        - keycloak.example.com
      secretName: ""

  # ingress for console only (/auth/admin)
  console:
    # If `true`, an Ingress is created for console path only
    enabled: false
    # Ingress annotations for console ingress only
    # Useful to set nginx.ingress.kubernetes.io/whitelist-source-range particularly
    annotations: {}
    rules:
      -
        # Ingress host
        host: '{{ .Release.Name }}.keycloak.example.com'
        # Paths for the host
        paths:
          - /auth/admin/

## Network policy configuration
networkPolicy:
  # If true, the Network policies are deployed
  enabled: false

  # Additional Network policy labels
  labels: {}

  # Define all other external allowed source
  # See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#networkpolicypeer-v1-networking-k8s-io
  extraFrom: []

route:
  # If `true`, an OpenShift Route is created
  enabled: false
  # Path for the Route
  path: /
  # Route annotations
  annotations: {}
  # Additional Route labels
  labels: {}
  # Host name for the Route
  host: ""
  # TLS configuration
  tls:
    # If `true`, TLS is enabled for the Route
    enabled: true
    # Insecure edge termination policy of the Route. Can be `None`, `Redirect`, or `Allow`
    insecureEdgeTerminationPolicy: Redirect
    # TLS termination of the route. Can be `edge`, `passthrough`, or `reencrypt`
    termination: edge

pgchecker:
  image:
    # Docker image used to check Postgresql readiness at startup
431
    repository: registry.dso.mil/platform-one/big-bang/apps/security-tools/keycloak/busybox
michaelmcleroy's avatar
michaelmcleroy committed
432 433 434 435 436 437 438 439 440 441 442 443 444
    # Image tag for the pgchecker image
    tag: 1.32
    # Image pull policy for the pgchecker image
    pullPolicy: IfNotPresent
  # SecurityContext for the pgchecker container
  securityContext:
    allowPrivilegeEscalation: false
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
  # Resource requests and limits for the pgchecker container
  resources:
    requests:
445 446
      cpu: "20m"
      memory: "32Mi"
michaelmcleroy's avatar
michaelmcleroy committed
447
    limits:
448 449
      cpu: "20m"
      memory: "32Mi"
michaelmcleroy's avatar
michaelmcleroy committed
450 451 452 453 454 455 456 457 458 459 460 461 462

postgresql:
  # If `true`, the Postgresql dependency is enabled
  enabled: true
  # PostgreSQL User to create
  postgresqlUsername: keycloak
  # PostgreSQL Password for the new user
  postgresqlPassword: keycloak
  # PostgreSQL Database to create
  postgresqlDatabase: keycloak
  # PostgreSQL network policy configuration
  networkPolicy:
    enabled: false
463
  # Added by BigBang
464 465 466 467 468 469 470
  # change bitnami sub-chart upstream image to pull from registry.dso.mil
  # this image is only used for dev and CI pipelines
  image:
    ## could not get IronBank hardened image to work with the bitnami postgres sub-chart
    registry: registry.dso.mil
    repository: platform-one/big-bang/apps/security-tools/keycloak/postgresql
    tag: 11.8.0-debian-10-r61
Ernest Chuang's avatar
Ernest Chuang committed
471 472 473 474 475 476 477 478
  
  resources:
    requests:
      cpu: "250m"
      memory: "256Mi"
    limits:
      cpu: "250m"
      memory: "256Mi"
479

michaelmcleroy's avatar
michaelmcleroy committed
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594
serviceMonitor:
  # If `true`, a ServiceMonitor resource for the prometheus-operator is created
  enabled: false
  # Optionally sets a target namespace in which to deploy the ServiceMonitor resource
  namespace: ""
  # Optionally sets a namespace for the ServiceMonitor
  namespaceSelector: {}
  # Annotations for the ServiceMonitor
  annotations: {}
  # Additional labels for the ServiceMonitor
  labels: {}
  # Interval at which Prometheus scrapes metrics
  interval: 10s
  # Timeout for scraping
  scrapeTimeout: 10s
  # The path at which metrics are served
  path: /metrics
  # The Service port at which metrics are served
  port: http-management

extraServiceMonitor:
  # If `true`, a ServiceMonitor resource for the prometheus-operator is created
  enabled: false
  # Optionally sets a target namespace in which to deploy the ServiceMonitor resource
  namespace: ""
  # Optionally sets a namespace for the ServiceMonitor
  namespaceSelector: {}
  # Annotations for the ServiceMonitor
  annotations: {}
  # Additional labels for the ServiceMonitor
  labels: {}
  # Interval at which Prometheus scrapes metrics
  interval: 10s
  # Timeout for scraping
  scrapeTimeout: 10s
  # The path at which metrics are served
  path: /auth/realms/master/metrics
  # The Service port at which metrics are served
  port: http

prometheusRule:
  # If `true`, a PrometheusRule resource for the prometheus-operator is created
  enabled: false
  # Annotations for the PrometheusRule
  annotations: {}
  # Additional labels for the PrometheusRule
  labels: {}
  # List of rules for Prometheus
  rules: []
  # - alert: keycloak-IngressHigh5xxRate
  #   annotations:
  #     message: The percentage of 5xx errors for keycloak over the last 5 minutes is over 1%.
  #   expr: |
  #     (
  #       sum(
  #         rate(
  #           nginx_ingress_controller_response_duration_seconds_count{exported_namespace="mynamespace",ingress="mynamespace-keycloak",status=~"5[0-9]{2}"}[1m]
  #         )
  #       )
  #       /
  #       sum(
  #         rate(
  #           nginx_ingress_controller_response_duration_seconds_count{exported_namespace="mynamespace",ingress="mynamespace-keycloak"}[1m]
  #         )
  #       )
  #     ) * 100 > 1
  #   for: 5m
  #   labels:
  #     severity: warning

autoscaling:
  # If `true`, a autoscaling/v2beta2 HorizontalPodAutoscaler resource is created (requires Kubernetes 1.18 or above)
  # Autoscaling seems to be most reliable when using KUBE_PING service discovery (see README for details)
  # This disables the `replicas` field in the StatefulSet
  enabled: false
  # Additional HorizontalPodAutoscaler labels
  labels: {}
  # The minimum and maximum number of replicas for the Keycloak StatefulSet
  minReplicas: 3
  maxReplicas: 10
  # The metrics to use for scaling
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 80
  # The scaling policy to use. This will scale up quickly but only scale down a single Pod per 5 minutes.
  # This is important because caches are usually only replicated to 2 Pods and if one of those Pods is terminated this will give the cluster time to recover.
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
        - type: Pods
          value: 1
          periodSeconds: 300

test:
  # If `true`, test resources are created
  enabled: false
  image:
    # The image for the test Pod
    repository: docker.io/unguiculus/docker-python3-phantomjs-selenium
    # The tag for the test Pod image
    tag: v1
    # The image pull policy for the test Pod image
    pullPolicy: IfNotPresent
  # SecurityContext for the entire test Pod
  podSecurityContext:
    fsGroup: 1000
  # SecurityContext for the test container
  securityContext:
    runAsUser: 1000
    runAsNonRoot: true
kevin.wilder's avatar
kevin.wilder committed
595 596 597

# Big Bang Additions
## Your FQDN will be ${ .Values.subdomain }.${ .Values.hostname }
kevin.wilder's avatar
kevin.wilder committed
598
hostname: bigbang.dev
kevin.wilder's avatar
kevin.wilder committed
599 600 601 602 603 604 605 606 607
istio:
  # Toggle istio integration
  enabled: false
  keycloak:
    # Toggle vs creation
    enabled: false
    annotations: {}
    labels: {}
    gateways:
michaelmcleroy's avatar
michaelmcleroy committed
608
      - istio-system/main
kevin.wilder's avatar
kevin.wilder committed
609
    hosts:
610
      - keycloak.{{ .Values.hostname }}
611
monitoring:
Branden Cobb's avatar
Branden Cobb committed
612 613 614 615 616
  enabled: false
networkPolicies:
  enabled: false
  ingressLabels:
    app: istio-ingressgateway
617
    istio: ingressgateway
618 619
  smtpPort: 587
  
Ronnie Webb's avatar
Ronnie Webb committed
620
openshift: false