-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis sentinel does not work, chart throws error on install #191
Comments
There is an indentation problem in your file. extraEnv:
- name: <ENV_NAME>
value: <ENV_VALUE> For your reference, here is the code that generates the manifest: If even solving this you have issues, we can try to understand the further problem. |
@pierluigilenoci This works sessionStorage:
# Can be one of the supported session storage cookie|redis
type: redis
redis:
# Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
password: "${redis_password}"
# Can be one of standalone|cluster|sentinel
# Sentinel and cluster do not work, chart won't install, could not figure it out. Sarge.
clientType: "standalone"
# NOTE: Sentinel does not work, have open case https://github.com/oauth2-proxy/manifests/issues/191
# sentinel:
# # Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
# #existingSecret: "none"
# # Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
# password: "${redis_password}"
# # Key of the Kubernetes secret data containing the redis sentinel password value
# passwordKey: "redis-sentinel-password"
# # Redis sentinel master name
# masterName: "master"
# # List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
# connectionUrls: '["redis://127.0.0.1:8000","redis://127.0.0.1:8000","redis://127.0.0.1:8000"]'
# Enables and configure the automatic deployment of the redis subchart
redis:
global:
imageRegistry: sel-docker.artifactory.metro.ad.selinc.com
redis:
password: ${redis_password}
# provision an instance of the redis sub-chart
enabled: true
tls:
enabled: true
authClients: false
autoGenerated: true
# Redis specific helm chart settings, please see:
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
# redisPort: 6379
# sentinel:
# enabled: true This does not sessionStorage:
# Can be one of the supported session storage cookie|redis
type: redis
redis:
# Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
password: "${redis_password}"
# Can be one of standalone|cluster|sentinel
# Sentinel and cluster do not work, chart won't install, could not figure it out. Sarge.
clientType: "sentinel"
# NOTE: Sentinel does not work, have open case https://github.com/oauth2-proxy/manifests/issues/191
sentinel:
# Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
#existingSecret: "none"
# Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
password: "${redis_password}"
# Key of the Kubernetes secret data containing the redis sentinel password value
#passwordKey: "redis-sentinel-password"
# Redis sentinel master name
masterName: "master"
# List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
connectionUrls: '["redis://127.0.0.1:8000","redis://127.0.0.1:8000","redis://127.0.0.1:8000"]'
# Enables and configure the automatic deployment of the redis subchart
redis:
global:
imageRegistry: sel-docker.artifactory.metro.ad.selinc.com
redis:
password: ${redis_password}
# provision an instance of the redis sub-chart
enabled: true
tls:
enabled: true
authClients: false
autoGenerated: true
# Redis specific helm chart settings, please see:
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
# redisPort: 6379
sentinel:
enabled: true And to dig a little deeper, if you start with working example above and change Here's the error again: |
To enable
The problem could be the quoting. Try to validate your Further detail: https://github.com/msepp/oauth2_proxy/blob/v4.2.2/pkg/apis/options/sessions.go#L25 |
As briefly mentioned in a comment, this also applies when I do not see any logic in the helm chart that transforms the list of |
@Pionerd, there is no logic. |
@sarg3nt Were you able to solve it? |
@pierluigilenoci Sorry for the delay, was sidetracked on other projects.
inserted into it. Turns out if Helm sees the square brackets, it removes the quotes, regardless of quote type and turns it into an actual array. It then fails because an array is not a string. The redis cluster seems to be bootstrapping just fine but the So either I set Note: From what I can tell from here there is no Redis master deployed when the cluster is in sentinel mode. So not sure what the deal is with it looking for a master and with the Here's the new latter half of the config # Configure the session storage type, between cookie and redis
sessionStorage:
# Can be one of the supported session storage cookie|redis
type: redis
redis:
# Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
password: "${redis_password}"
# Can be one of standalone|cluster|sentinel
# Sentinel and cluster do not work, chart won't install, could not figure it out. Sarge.
clientType: "sentinel"
# NOTE: Sentinel does not work, have open case https://github.com/oauth2-proxy/manifests/issues/191
sentinel:
# Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
#existingSecret: "none"
# Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
password: "${redis_password}"
# Key of the Kubernetes secret data containing the redis sentinel password value
# passwordKey: "redis-sentinel-password"
# Redis sentinel master name
masterName: "oauth2-proxy-redis-node-0"
# Error from server (NotFound): pods "oauth2-proxy-redis-master-0" not found
# List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
connectionUrls: "redis://oauth2-proxy-redis-node-0:26379,redis://oauth2-proxy-redis-node-1:26379,redis://oauth2-proxy-redis-node-2:26379"
#oauth2-proxy-redis-node-0:26379
# Enables and configure the automatic deployment of the redis subchart
redis:
global:
imageRegistry: sel-docker.artifactory.metro.ad.selinc.com
redis:
password: ${redis_password}
# provision an instance of the redis sub-chart
enabled: true
tls:
enabled: true
authClients: false
autoGenerated: true
# Redis specific helm chart settings, please see:
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
# redisPort: 6379
sentinel:
enabled: true And some screenshots: |
Hi,
Solution would be:
|
@andreasgeisslerdt thank you for the suggestion, please see #205 |
@andreasgeisslerdt @Pionerd @sarg3nt Thank you for the collective effort to resolve this issue. |
This has fixed my problem. Below is my config that works in case future users need some help. Once we figure out if there is / is not a better solution to
# Configure the session storage type, between cookie and redis
sessionStorage:
# Can be one of the supported session storage cookie|redis
type: redis
redis:
# Redis password value. Applicable for all Redis configurations. Taken from redis subchart secret if not set. `sessionStorage.redis.existingSecret` takes precedence
password: "${redis_password}"
# Can be one of standalone|cluster|sentinel
clientType: "sentinel"
sentinel:
# Name of the Kubernetes secret containing the redis sentinel password value (see also `sessionStorage.redis.sentinel.passwordKey`). Default: `sessionStorage.redis.existingSecret`
existingSecret: ""
# Redis sentinel password. Used only for sentinel connection; any redis node passwords need to use `sessionStorage.redis.password`
password: "${redis_password}"
# Key of the Kubernetes secret data containing the redis sentinel password value
passwordKey: "redis-sentinel-password" # This is not used as we are passing in a password from Terraform.
# Redis sentinel master name, default in the chart is "mymaster"
masterName: "mymaster"
# List of Redis sentinel connection URLs (e.g. `["redis://127.0.0.1:8000", "redis://127.0.0.1:8000"]`)
# Only thing I could get to work was to point at the service.
connectionUrls: "redis://oauth2-proxy-redis:26379"
# Enables and configure the automatic deployment of the redis subchart
redis:
global:
redis:
password: ${redis_password}
# provision an instance of the redis sub-chart
enabled: true
tls:
enabled: true
authClients: false
autoGenerated: true
# Redis specific helm chart settings, please see:
# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters
# redisPort: 6379
sentinel:
enabled: true
# This is the default according to the chart docs https://github.com/bitnami/charts/tree/main/bitnami/redis#parameters
# Setting it here to be extra safe in case the default changes at some point.
masterSet: "mymaster" |
The helm chart throws an error during install with
sessionStorage.rdis.clientType: sentinel
I've tried all kinds of configs and cannot get it to run properly.
I haven't been able to determine if there is a value I'm not setting that it doesn't like or if it's just broken.
Error:
Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal array into Go struct field EnvVar.spec.template.spec.containers.env.value of type strin
Config:
The text was updated successfully, but these errors were encountered: