github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/dex/README.md (about) 1 # dex 2 3     [](https://artifacthub.io/packages/helm/dex/dex) 4 5 OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. 6 7 **Homepage:** <https://dexidp.io/> 8 9 ## TL;DR; 10 11 ```bash 12 helm repo add dex https://charts.dexidp.io 13 helm install --generate-name --wait dex/dex 14 ``` 15 16 ## Getting started 17 18 ### Minimal configuration 19 20 Dex requires a minimal configuration in order to work. 21 You can pass configuration to Dex using Helm values: 22 23 ```yaml 24 config: 25 # Set it to a valid URL 26 issuer: http://my-issuer-url.com 27 28 # See https://dexidp.io/docs/storage/ for more options 29 storage: 30 type: memory 31 32 # Enable at least one connector 33 # See https://dexidp.io/docs/connectors/ for more options 34 enablePasswordDB: true 35 ``` 36 37 The above configuration won't make Dex automatically available on the configured URL. 38 One (and probably the easiest) way to achieve that is configuring ingress: 39 40 ```yaml 41 ingress: 42 enabled: true 43 44 hosts: 45 - host: my-issuer-url.com 46 paths: 47 - path: / 48 ``` 49 50 ### Minimal TLS configuration 51 52 HTTPS is basically mandatory these days, especially for authentication and authorization services. 53 There are several solutions for protecting services with TlS in Kubernetes, 54 but by far the most popular and portable is undoubtedly [Cert Manager](https://cert-manager.io). 55 56 Cert Manager can be [installed](https://cert-manager.io/docs/installation/kubernetes) with a few steps: 57 58 ```shell 59 helm repo add jetstack https://charts.jetstack.io 60 helm repo update 61 kubectl create namespace cert-manager 62 helm install \ 63 cert-manager jetstack/cert-manager \ 64 --namespace cert-manager \ 65 --set installCRDs=true 66 ``` 67 68 The next step is setting up an [issuer](https://cert-manager.io/docs/concepts/issuer/) (eg. [Let's Encrypt](https://letsencrypt.org/)): 69 70 ```shell 71 cat <<EOF | kubectl apply -f - 72 apiVersion: cert-manager.io/v1 73 kind: ClusterIssuer 74 metadata: 75 name: acme 76 spec: 77 acme: 78 email: YOUR@EMAIL_ADDRESS 79 server: https://acme-v02.api.letsencrypt.org/directory 80 privateKeySecretRef: 81 name: acme-account-key 82 solvers: 83 - http01: 84 ingress: 85 class: YOUR_INGRESS_CLASS 86 EOF 87 ``` 88 89 Finally, change the ingress config to use TLS: 90 91 ```yaml 92 ingress: 93 enabled: true 94 95 annotations: 96 cert-manager.io/cluster-issuer: acme 97 98 hosts: 99 - host: my-issuer-url.com 100 paths: 101 - path: / 102 103 tls: 104 - hosts: 105 - my-issuer-url.com 106 secretName: dex-cert 107 ``` 108 109 ## Values 110 111 | Key | Type | Default | Description | 112 |-----|------|---------|-------------| 113 | replicaCount | int | `1` | Number of replicas (pods) to launch. | 114 | commonLabels | object | `{}` | Labels to apply to all resources and selectors. | 115 | image.repository | string | `"ghcr.io/dexidp/dex"` | Name of the image repository to pull the container image from. | 116 | image.pullPolicy | string | `"IfNotPresent"` | [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for updating already existing images on a node. | 117 | image.tag | string | `""` | Image tag override for the default value (chart appVersion). | 118 | imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when [pulling images](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) (from private registries). | 119 | nameOverride | string | `""` | A name in place of the chart name for `app:` labels. | 120 | fullnameOverride | string | `""` | A name to substitute for the full names of resources. | 121 | hostAliases | list | `[]` | A list of hosts and IPs that will be injected into the pod's hosts file if specified. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#hostname-and-name-resolution) | 122 | https.enabled | bool | `false` | Enable the HTTPS endpoint. | 123 | grpc.enabled | bool | `false` | Enable the gRPC endpoint. Read more in the [documentation](https://dexidp.io/docs/api/). | 124 | configSecret.create | bool | `true` | Enable creating a secret from the values passed to `config`. If set to false, name must point to an existing secret. | 125 | configSecret.name | string | `""` | The name of the secret to mount as configuration in the pod. If not set and create is true, a name is generated using the fullname template. Must point to secret that contains at least a `config.yaml` key. | 126 | config | object | `{}` | Application configuration. See the [official documentation](https://dexidp.io/docs/). | 127 | volumes | list | `[]` | Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | 128 | volumeMounts | list | `[]` | Additional [volume mounts](https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. | 129 | envFrom | list | `[]` | Additional environment variables mounted from [secrets](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables) or [config maps](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | 130 | env | object | `{}` | Additional environment variables passed directly to containers. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | 131 | envVars | list | `[]` | Similar to env but with support for all possible configurations. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) for details. | 132 | serviceAccount.create | bool | `true` | Enable service account creation. | 133 | serviceAccount.annotations | object | `{}` | Annotations to be added to the service account. | 134 | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | 135 | rbac.create | bool | `true` | Specifies whether RBAC resources should be created. If disabled, the operator is responsible for creating the necessary resources based on the templates. | 136 | rbac.createClusterScoped | bool | `true` | Specifies which RBAC resources should be created. If disabled, the operator is responsible for creating the necessary resources (ClusterRole and RoleBinding or CRD's) | 137 | deploymentAnnotations | object | `{}` | Annotations to be added to deployment. | 138 | deploymentLabels | object | `{}` | Labels to be added to deployment. | 139 | podAnnotations | object | `{}` | Annotations to be added to pods. | 140 | podLabels | object | `{}` | Labels to be added to pods. | 141 | podDisruptionBudget.enabled | bool | `false` | Enable a [pod distruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) to help dealing with [disruptions](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/). It is **highly recommended** for webhooks as disruptions can prevent launching new pods. | 142 | podDisruptionBudget.minAvailable | int/percentage | `nil` | Number or percentage of pods that must remain available. | 143 | podDisruptionBudget.maxUnavailable | int/percentage | `nil` | Number or percentage of pods that can be unavailable. | 144 | priorityClassName | string | `""` | Specify a priority class name to set [pod priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority). | 145 | podSecurityContext | object | `{}` | Pod [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) for details. | 146 | revisionHistoryLimit | int | `10` | Define the [count of deployment revisions](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#clean-up-policy) to be kept. May be set to 0 in case of GitOps deployment approach. | 147 | securityContext | object | `{}` | Container [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) for details. | 148 | service.annotations | object | `{}` | Annotations to be added to the service. | 149 | service.type | string | `"ClusterIP"` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). | 150 | service.clusterIP | string | `""` | Internal cluster service IP (when applicable) | 151 | service.ports.http.port | int | `5556` | HTTP service port | 152 | service.ports.http.nodePort | int | `nil` | HTTP node port (when applicable) | 153 | service.ports.https.port | int | `5554` | HTTPS service port | 154 | service.ports.https.nodePort | int | `nil` | HTTPS node port (when applicable) | 155 | service.ports.grpc.port | int | `5557` | gRPC service port | 156 | service.ports.grpc.nodePort | int | `nil` | gRPC node port (when applicable) | 157 | ingress.enabled | bool | `false` | Enable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/). | 158 | ingress.className | string | `""` | Ingress [class name](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). | 159 | ingress.annotations | object | `{}` | Annotations to be added to the ingress. | 160 | ingress.hosts | list | See [values.yaml](values.yaml). | Ingress host configuration. | 161 | ingress.tls | list | See [values.yaml](values.yaml). | Ingress TLS configuration. | 162 | serviceMonitor.enabled | bool | `false` | Enable Prometheus ServiceMonitor. See the [documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/design.md#servicemonitor) and the [API reference](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor) for details. | 163 | serviceMonitor.namespace | string | Release namespace. | Namespace where the ServiceMonitor resource should be deployed. | 164 | serviceMonitor.interval | duration | `nil` | Prometheus scrape interval. | 165 | serviceMonitor.scrapeTimeout | duration | `nil` | Prometheus scrape timeout. | 166 | serviceMonitor.labels | object | `{}` | Labels to be added to the ServiceMonitor. | 167 | serviceMonitor.annotations | object | `{}` | Annotations to be added to the ServiceMonitor. | 168 | serviceMonitor.scheme | string | `""` | HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. | 169 | serviceMonitor.path | string | `"/metrics"` | HTTP path to scrape for metrics. | 170 | serviceMonitor.tlsConfig | object | `{}` | TLS configuration to use when scraping the endpoint. For example if using istio mTLS. | 171 | serviceMonitor.bearerTokenFile | string | `nil` | Prometheus scrape bearerTokenFile | 172 | serviceMonitor.honorLabels | bool | `false` | HonorLabels chooses the metric's labels on collisions with target labels. | 173 | serviceMonitor.metricRelabelings | list | `[]` | Prometheus scrape metric relabel configs to apply to samples before ingestion. | 174 | serviceMonitor.relabelings | list | `[]` | Relabel configs to apply to samples before ingestion. | 175 | resources | object | No requests or limits. | Container resource [requests and limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources) for details. | 176 | autoscaling | object | Disabled by default. | Autoscaling configuration (see [values.yaml](values.yaml) for details). | 177 | nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) configuration. | 178 | tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for node taints. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | 179 | affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) configuration. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | 180 | topologySpreadConstraints | list | `[]` | [TopologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) configuration. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | 181 | strategy | object | `{}` | Deployment [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) configuration. | 182 | networkPolicy.enabled | bool | `false` | Create [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) | 183 | networkPolicy.egressRules | list | `[]` | A list of network policy egress rules | 184 185 ## Migrating from stable/dex (or banzaicloud-stable/dex) chart 186 187 This chart is not backwards compatible with the `stable/dex` (or `banzaicloud-stable/dex`) chart. 188 189 However, Dex itself remains backwards compatible, so you can easily install the new chart in place of the old one 190 and continue using Dex with a minimal downtime.