-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add environment variables and auto-generate secrets in k8s deployments (
- Loading branch information
1 parent
5ff4036
commit 53f2b7e
Showing
8 changed files
with
113 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,12 @@ rm -rf ${HOME}/streampipes-k8s | |
|-------------------------------------------------|---------------------------------------------------------|------------------------------------------| | ||
| streampipes.version | StreamPipes version | "0.93.0-SNAPSHOT" | | ||
| streampipes.registry | StreamPipes registry URL | "apachestreampipes" | | ||
| streampipes.auth.secretName | The secret name for storing secrets | "sp-secrets" | | ||
| streampipes.auth.users.admin.user | The initial admin user | "[email protected]" | | ||
| streampipes.auth.users.admin.password | The initial admin password (leave empty for autogen) | "admin" | | ||
| streampipes.auth.users.service.user | The initial service account user | "sp-service-client" | | ||
| streampipes.auth.users.service.secret | The initial service account secret | empty (auto-generated) | | ||
| streampipes.auth.encryption.passcode | Passcode for value encryption | empty (auto-generated) | | ||
| streampipes.core.appName | StreamPipes backend application name | "backend" | | ||
| streampipes.core.port | StreamPipes backend port | 8030 | | ||
| streampipes.core.persistence.storageClassName | Storage class name for backend PVs | "hostpath" | | ||
|
@@ -162,7 +168,7 @@ rm -rf ${HOME}/streampipes-k8s | |
| external.couchdb.appName | CouchDB application name | "couchdb" | | ||
| external.couchdb.version | CouchDB version | 3.3.1 | | ||
| external.couchdb.user | CouchDB admin username | "admin" | | ||
| external.couchdb.password | CouchDB admin password | "admin" | | ||
| external.couchdb.password | CouchDB admin password | empty (auto-generated) | | ||
| external.couchdb.port | Port for the CouchDB service | 5984 | | ||
| external.couchdb.service.name | Name of the CouchDB service | "couchdb" | | ||
| external.couchdb.service.port | TargetPort of the CouchDB service | 5984 | | ||
|
@@ -177,8 +183,8 @@ rm -rf ${HOME}/streampipes-k8s | |
| external.influxdb.appName | InfluxDB application name | "influxdb" | | ||
| external.influxdb.version | InfluxDB version | 2.6 | | ||
| external.influxdb.username | InfluxDB admin username | "admin" | | ||
| external.influxdb.password | InfluxDB admin password | "sp-admin" | | ||
| external.influxdb.adminToken | InfluxDB admin token | "sp-admin" | | ||
| external.influxdb.password | InfluxDB admin password | empty (auto-generated) | | ||
| external.influxdb.adminToken | InfluxDB admin token | empty (auto-generated) | | ||
| external.influxdb.initOrg | InfluxDB initial organization | "sp" | | ||
| external.influxdb.initBucket | InfluxDB initial bucket | "sp" | | ||
| external.influxdb.initMode | InfluxDB initialization mode | "setup" | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: sp-secrets | ||
namespace: {{ .Release.Namespace | quote }} | ||
type: Opaque | ||
data: | ||
sp-initial-admin-password: {{ ternary (randAlphaNum 10) .Values.streampipes.auth.users.admin.password (empty .Values.streampipes.auth.users.admin.password) | b64enc | quote }} | ||
sp-initial-client-secret: {{ ternary (randAlphaNum 35) .Values.streampipes.auth.users.service.secret (empty .Values.streampipes.auth.users.service.secret) | b64enc | quote }} | ||
sp-encryption-passcode: {{ ternary (randAlphaNum 20) .Values.streampipes.auth.encryption.passcode (empty .Values.streampipes.auth.encryption.passcode) | b64enc | quote }} | ||
sp-couchdb-password: {{ ternary (randAlphaNum 20) .Values.external.couchdb.password (empty .Values.external.couchdb.password) | b64enc | quote }} | ||
sp-ts-storage-password: {{ ternary (randAlphaNum 20) .Values.external.influxdb.password (empty .Values.external.influxdb.password) | b64enc | quote }} | ||
sp-ts-storage-token: {{ ternary (randAlphaNum 20) .Values.external.influxdb.adminToken (empty .Values.external.influxdb.adminToken) | b64enc | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,17 @@ hostPath: "" | |
streampipes: | ||
version: "0.93.0-SNAPSHOT" | ||
registry: "apachestreampipes" | ||
auth: | ||
secretName: "sp-secrets" | ||
users: | ||
admin: | ||
user: "[email protected]" | ||
password: "admin" | ||
service: | ||
user: "sp-service-client" | ||
secret: | ||
encryption: | ||
passcode: | ||
core: | ||
appName: "backend" | ||
port: 8030 | ||
|
@@ -93,7 +104,7 @@ external: | |
appName: "couchdb" | ||
version: 3.3.1 | ||
user: "admin" | ||
password: "admin" | ||
password: | ||
port: 5984 | ||
service: | ||
name: "couchdb" | ||
|
@@ -108,7 +119,7 @@ external: | |
version: 2.6 | ||
username: "admin" | ||
password: "sp-admin" | ||
adminToken: "sp-admin" | ||
adminToken: | ||
initOrg: "sp" | ||
initBucket: "sp" | ||
# For database migration in v0.91.0 - set init mode to 'upgrade' to migrate an existing installation | ||
|