Skip to content

Commit

Permalink
Add etcd configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DebakelOrakel authored and Debakel Orakel committed Mar 9, 2024
2 parents accf38c + bd62506 commit 12bf809
Show file tree
Hide file tree
Showing 29 changed files with 399 additions and 23 deletions.
68 changes: 63 additions & 5 deletions package/sink.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,74 @@
applications:
- sentry-operators
- grafana-operator
- etcd as insight-etcd

parameters:
components:
sentry-operators:
url: https://github.com/tegridy-io/component-sentry-operators.git
grafana-operator:
url: https://github.com/tegridy-io/component-grafana-operator.git
version: master
etcd:
url: https://github.com/projectsyn/component-etcd.git
version: v0.1.0

sentry_operators:
# --- Grafana Operator -------------------------------------------------------

grafana_operator:
namespace:
name: efk-operator-sentry
name: efk-operator-grafana

operator:
grafana:
enabled: true

# --- Etcd -------------------------------------------------------------------

insight_etcd:
namespace: efk-insight-etcd
secrets:
etcd-root-auth:
stringData:
password: '?{vaultkv:${cluster:tenant}/${cluster:name}/insight/etcd/rootPassword}'
etcd-token-private-key:
stringData:
jwt-token.pem: '?{vaultkv:${cluster:tenant}/${cluster:name}/insight/etcd/tokenPrivkey}'

helm_values:
fullnameOverride: etcd
# podSecurityContext:
# fsGroup: null
# containerSecurityContext:
# runAsUser: null
autoCompactionMode: periodic
autoCompactionRetention: 12h

replicaCount: 3

resources:
requests:
cpu: 100m
memory: 400Mi
limits:
memory: 800Mi

auth:
rbac:
allowNoneAuthentication: false
existingSecret: etcd-root-auth
client:
secureTransport: true
useAutoTLS: true
# existingSecret: etcd-client-auth
existingSecret: ''
peer:
secureTransport: true
useAutoTLS: true
# existingSecret: etcd-peer-auth
existingSecret: ''
token:
privateKey:
existingSecret: etcd-token-private-key

persistence:
storageClass: ceph-block
size: 2Gi
10 changes: 5 additions & 5 deletions package/sprout.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
applications:
- sentry-operators
- grafana-operator

parameters:
components:
sentry-operators:
url: https://github.com/tegridy-io/component-sentry-operators.git
grafana-operator:
url: https://github.com/tegridy-io/component-grafana-operator.git
version: master

sentry_operators:
grafana_operator:
namespace:
name: efk-operator-sentry
name: efk-operator-grafana

operator:
agent:
Expand Down
57 changes: 52 additions & 5 deletions tests/defaults.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,65 @@
applications:
- sentry-operators
- grafana-operator
- etcd as insight-etcd

parameters:
components:
sentry-operators:
url: https://github.com/tegridy-io/component-sentry-operators.git
grafana-operator:
url: https://github.com/tegridy-io/component-grafana-operator.git
version: master
etcd:
url: https://github.com/projectsyn/component-etcd.git
version: master

sentry_operators:
grafana_operator:
namespace:
name: efk-operator-sentry
name: efk-operator-grafana

operator:
grafana:
enabled: true
agent:
enabled: true

# --- Etcd -------------------------------------------------------------------

insight_etcd:
namespace: efk-insight-etcd
secrets:
etcd-root-auth:
stringData:
password: '?{vaultkv:${cluster:tenant}/${cluster:name}/insight/etcd/rootPassword}'
etcd-token-private-key:
stringData:
jwt-token.pem: '?{vaultkv:${cluster:tenant}/${cluster:name}/insight/etcd/tokenPrivkey}'

helm_values:
fullnameOverride: etcd
# podSecurityContext:
# fsGroup: null
# containerSecurityContext:
# runAsUser: null
autoCompactionMode: periodic
autoCompactionRetention: 12h

replicaCount: 3

auth:
rbac:
allowNoneAuthentication: false
existingSecret: etcd-root-auth
client:
secureTransport: true
useAutoTLS: true
existingSecret: ''
peer:
secureTransport: true
useAutoTLS: true
existingSecret: ''
token:
privateKey:
existingSecret: etcd-token-private-key

persistence:
storageClass: ceph-block
size: 2Gi
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Namespace
metadata:
labels:
app.kubernetes.io/managed-by: commodore
app.kubernetes.io/name: efk-operator-sentry
app.kubernetes.io/name: efk-operator-grafana
app.kubernetes.io/part-of: insights
pod-security.kubernetes.io/audit: restricted
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/warn: restricted
name: efk-operator-sentry
name: efk-operator-grafana
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: agent-operator
namespace: efk-operator-sentry
namespace: efk-operator-grafana
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metadata:
app.kubernetes.io/version: 0.40.1
helm.sh/chart: grafana-agent-operator-0.3.17
name: agent-operator
namespace: efk-operator-sentry
namespace: efk-operator-grafana
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
app.kubernetes.io/version: v5.6.3
helm.sh/chart: grafana-operator-0.1.3
name: grafana-operator
namespace: efk-operator-sentry
namespace: efk-operator-grafana
spec:
replicas: 1
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: grafana-operator
namespace: efk-operator-sentry
namespace: efk-operator-grafana
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
app.kubernetes.io/version: v5.6.3
helm.sh/chart: grafana-operator-0.1.3
name: grafana-operator-metrics-service
namespace: efk-operator-sentry
namespace: efk-operator-grafana
spec:
ports:
- name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metadata:
app.kubernetes.io/version: v5.6.3
helm.sh/chart: grafana-operator-0.1.3
name: grafana-operator
namespace: efk-operator-sentry
namespace: efk-operator-grafana
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
annotations: {}
labels:
name: efk-insight-etcd
name: efk-insight-etcd
25 changes: 25 additions & 0 deletions tests/golden/defaults/insight-etcd/insight-etcd/01_secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
data: {}
kind: Secret
metadata:
annotations: {}
labels:
name: etcd-root-auth
name: etcd-root-auth
namespace: efk-insight-etcd
stringData:
password: ?{vaultkv:t-silent-test-1234/c-green-test-1234/insight/etcd/rootPassword:3ce3866a}
type: Opaque
---
apiVersion: v1
data: {}
kind: Secret
metadata:
annotations: {}
labels:
name: etcd-token-private-key
name: etcd-token-private-key
namespace: efk-insight-etcd
stringData:
jwt-token.pem: ?{vaultkv:t-silent-test-1234/c-green-test-1234/insight/etcd/tokenPrivkey:1fadb16d}
type: Opaque
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
app.kubernetes.io/instance: insight-etcd
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: etcd
helm.sh/chart: etcd-9.1.0
name: etcd
namespace: efk-insight-etcd
spec:
minAvailable: 51%
selector:
matchLabels:
app.kubernetes.io/component: etcd
app.kubernetes.io/instance: insight-etcd
app.kubernetes.io/name: etcd
Loading

0 comments on commit 12bf809

Please sign in to comment.