Skip to content
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

Added the cluster configuration #26

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion charts/lunar-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,15 @@ spec:
- name: LUNAR_RETRY_REQUEST_TIMEOUT_SEC
value: {{ toString .Values.timeouts.retryRequestTimeoutSec | quote }}
{{- end }}

# Lunar Cluster
{{- if .Values.lunarCluster.staleThresholdPeriodInSec }}
- name: LUNAR_CLUSTER_STALE_THRESHOLD_PERIOD_IN_SEC
value: {{ toString .Values.lunarCluster.staleThresholdPeriodInSec | quote }}
{{- end }}
{{- if .Values.lunarCluster.livenessUpdatedPeriodInSec }}
- name: LUNAR_CLUSTER_LIVENESS_UPDATED_PERIOD_IN_SEC
value: {{ toString .Values.lunarCluster.livenessUpdatedPeriodInSec | quote }}
{{- end }}
# Redis
{{- if .Values.redis.url }}
- name: REDIS_URL
Expand Down
149 changes: 86 additions & 63 deletions charts/lunar-proxy/values.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["tenantName"],
"required": [
"tenantName"
],
"additionalProperties": true,
"properties": {
"pro": {
Expand Down Expand Up @@ -102,7 +104,9 @@
"includedMetrics": {
"type": "array",
"description": "An array of metric names to include in the export. Defaults to all metrics",
"default": [".*"],
"default": [
".*"
],
"items": {
"type": "string"
}
Expand Down Expand Up @@ -169,7 +173,10 @@
"description": "Allows for setting annotations on the Kubernetes service"
}
},
"required": ["type", "port"],
"required": [
"type",
"port"
],
"additionalProperties": false
},
"resources": {
Expand Down Expand Up @@ -261,71 +268,87 @@
}
}
},
"redis": {
"lunarCluster": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to the Redis instance. Needs to include schema and port. For TLS support, use `rediss://` as schema. This field is mandatory if `pro` is set to `true`",
"default": null,
"examples": ["redis://your-instance:6379"]
},
"useCluster": {
"type": "boolean",
"description": "Whether to connect to Redis as a cluster. Sets the `REDIS_USE_CLUSTER` environment variable"
},
"prefix": {
"type": "string",
"description": "A prefix to use for keys in Redis. Sets the `REDIS_PREFIX` environment variable"
},
"useCaCert": {
"type": "boolean",
"description": "Whether to use a CA certificate for Redis. Sets the `REDIS_USE_CA_CERT` environment variable"
},
"caCertPath": {
"type": "string",
"description": "The path to the CA certificate for Redis. Sets the `REDIS_CA_CERT_PATH` environment variable"
},
"useClientCert": {
"type": "boolean",
"description": "Whether to use a client certificate for Redis. Sets the `REDIS_USE_CLIENT_CERT` environment variable"
},
"clientCertPath": {
"type": "string",
"description": "The path to the client certificate for Redis. Sets the `REDIS_CLIENT_CERT_PATH` environment variable"
},
"clientKeyPath": {
"type": "string",
"description": "The path to the client key for Redis. Sets the `REDIS_CLIENT_KEY_PATH` environment variable"
}
}
},
"gateway": {
"type": "object",
"properties": {
"maxConn": {
"type": "integer",
"description": "The maximum number of connections Lunar Gateway can handle. Sets the `LUNAR_MAXCONN` environment variable"
},
"bufferSize": {
"staleThresholdPeriodInSec": {
"type": "integer",
"description": "The buffer size for Lunar Proxy. Sets the `GATEWAY_BUFFER_SIZE` environment variable"
},
"accessLogOutput": {
"type": "string",
"description": "Sets output for the Lunar Gateway's access log. Sets the `LUNAR_ACCESS_LOGS_OUTPUT` environment variable",
"enum": ["stdout"],
"default": null
"description": "The period in seconds after which a cluster is considered stale. Sets the `LUNAR_CLUSTER_STALE_THRESHOLD_PERIOD_IN_SEC` environment variable"
},
"doctorReportIntervalMinutes": {
"livenessUpdatedPeriodInSec": {
"type": "integer",
"description": "The interval in minutes for the doctor report. Sets the `DOCTOR_REPORT_INTERVAL_MINUTES` environment variable"
"description": "The period in seconds after which the liveness of a cluster is updated. Sets the `LUNAR_CLUSTER_LIVENESS_UPDATED_PERIOD_IN_SEC` environment variable"
}
},
"redis": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to the Redis instance. Needs to include schema and port. For TLS support, use `rediss://` as schema. This field is mandatory if `pro` is set to `true`",
"default": null,
"examples": [
"redis://your-instance:6379"
]
},
"useCluster": {
"type": "boolean",
"description": "Whether to connect to Redis as a cluster. Sets the `REDIS_USE_CLUSTER` environment variable"
},
"prefix": {
"type": "string",
"description": "A prefix to use for keys in Redis. Sets the `REDIS_PREFIX` environment variable"
},
"useCaCert": {
"type": "boolean",
"description": "Whether to use a CA certificate for Redis. Sets the `REDIS_USE_CA_CERT` environment variable"
},
"caCertPath": {
"type": "string",
"description": "The path to the CA certificate for Redis. Sets the `REDIS_CA_CERT_PATH` environment variable"
},
"useClientCert": {
"type": "boolean",
"description": "Whether to use a client certificate for Redis. Sets the `REDIS_USE_CLIENT_CERT` environment variable"
},
"clientCertPath": {
"type": "string",
"description": "The path to the client certificate for Redis. Sets the `REDIS_CLIENT_CERT_PATH` environment variable"
},
"clientKeyPath": {
"type": "string",
"description": "The path to the client key for Redis. Sets the `REDIS_CLIENT_KEY_PATH` environment variable"
}
}
},
"gateway": {
"type": "object",
"properties": {
"maxConn": {
"type": "integer",
"description": "The maximum number of connections Lunar Gateway can handle. Sets the `LUNAR_MAXCONN` environment variable"
},
"bufferSize": {
"type": "integer",
"description": "The buffer size for Lunar Proxy. Sets the `GATEWAY_BUFFER_SIZE` environment variable"
},
"accessLogOutput": {
"type": "string",
"description": "Sets output for the Lunar Gateway's access log. Sets the `LUNAR_ACCESS_LOGS_OUTPUT` environment variable",
"enum": [
"stdout"
],
"default": null
},
"doctorReportIntervalMinutes": {
"type": "integer",
"description": "The interval in minutes for the doctor report. Sets the `DOCTOR_REPORT_INTERVAL_MINUTES` environment variable"
}
}
},
"tlsPassthrough": {
"type": "boolean",
"description": "Enable TLS passthrough for Lunar Proxy. Sets the `TLS_PASSTHROUGH_ON` environment variable"
}
},
"tlsPassthrough": {
"type": "boolean",
"description": "Enable TLS passthrough for Lunar Proxy. Sets the `TLS_PASSTHROUGH_ON` environment variable"
}
}
}
}
12 changes: 8 additions & 4 deletions charts/lunar-proxy/values.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update values.schema.json as well

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ podAnnotations: {}

metrics:
datadog:
enabled: false # Users can set this to true to enable Datadog metrics collection
namespace: "lunar_proxy" # Default namespace for metrics; users can override as needed
enabled: false # Users can set this to true to enable Datadog metrics collection
namespace: "lunar_proxy" # Default namespace for metrics; users can override as needed
includedMetrics: # List of metrics to collect; default is all metrics
- ".*"

- ".*"

lunarAPIKey: null # Set the API key directly
lunarAPIKeySecretName: null # Set the API key from a secret (key must be named lunarAPIKey)
Expand All @@ -35,6 +34,11 @@ lunarHubURL: null
telemetryEnabled: true
lunarManaged: false

# Lunar Cluster configuration
lunarCluster:
staleThresholdPeriodInSec: 120
livenessUpdatedPeriodInSec: 5

# Redis configuration
redis:
prefix: "lunar"
Expand Down
Loading