-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[charts/csm-authorization]: CSM Authorization v2 (#459)
* add proxy-server sa * [csm-authorization]: Add Vault configuration to storage-service (#350) * Add Storage and CSMRole CRD into Authorization helm chart. (#305) * add crds * change group name * Revert "change group name" This reverts commit de262a3. * vault updates * vault agent updates * remove vault configs * revert to vautl client * configure vault certs * finish updates * revert values * revert values * revert values --------- Co-authored-by: Luna Xu <10015938+xuluna@users.noreply.github.com> * customize namespace (#352) * Update role-service for gitops (#356) * pass in storage service to role service * remove duplicate * add tenant crd (#351) * add event watch (#396) * add csmtenants access to proxy-server (#403) * add csmtenants access to proxy-server * add csmtenants access to proxy-server * remove storage service (#411) * Use default openshift ingress (#414) * use default openshift ingress * update comments * update crds for storage, role, and tenant (#415) * [KRV-21812] Storage capacity poll interval (#416) * [KRV-21812] Added storagePollInterval param * [KRV-21812] Rename param * [KRV-21812] Move param in config map * [KRV-21812] Comment * [KRV-21812] Capitalize parameter * Sreekb/krv 17923 gitops (#419) Helm chart update to deploy Redis with sentinels. * add vault role to values (#422) * Add snapshot policy and storage service compatibility (#423) * Add snapshots create policy * Add clusterroles for storage service * Add leaderelection arg * Address PR comments * Address PR comments * chart/csm-authorization support authorization-controller deployment in cluster (#429) * add support for authorization-controller deployment in cluster * add support for authorization-controller deployment in cluster * add password to redis commander (#430) * fix rebase * address PR comments --------- Co-authored-by: Luna Xu <10015938+xuluna@users.noreply.github.com> Co-authored-by: shaynafinocchiaro <shayna_finocchiaro@dell.com> Co-authored-by: alikdell <52920355+alikdell@users.noreply.github.com> Co-authored-by: EvgenyUglov <63835199+EvgenyUglov@users.noreply.github.com> Co-authored-by: Bharath Sreekanth <93715158+bharathsreekanth@users.noreply.github.com> Co-authored-by: Fernando Alfaro Campos <falfarocampos@outlook.com>
- Loading branch information
1 parent
53812b5
commit 63d7919
Showing
20 changed files
with
3,740 additions
and
107 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
name: redis | ||
description: A Helm chart for Redis | ||
name: redis-csm | ||
description: Helm Chart for Redis with Sentinels | ||
type: application | ||
version: 0.1.0 | ||
appVersion: 0.1.0 |
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,9 @@ | ||
{{/* | ||
Namespace for all resources to be installed into | ||
If not defined in values file then the helm release namespace is used | ||
By default this is not set so the helm release namespace will be used | ||
*/}} | ||
|
||
{{- define "custom.namespace" -}} | ||
{{ .Values.namespace | default .Release.Namespace }} | ||
{{- end -}} |
2,292 changes: 2,292 additions & 0 deletions
2,292
charts/csm-authorization/charts/redis/templates/redis-cm.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
charts/csm-authorization/charts/redis/templates/redis-secret.yaml
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,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: redis-csm-secret | ||
namespace: {{ include "custom.namespace" . }} | ||
type: kubernetes.io/basic-auth | ||
stringData: | ||
password: K@ravi123! | ||
commander_user: dev |
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
111 changes: 111 additions & 0 deletions
111
charts/csm-authorization/charts/redis/templates/sentinel.yaml
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,111 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ .Values.redis.sentinel }} | ||
spec: | ||
serviceName: {{ .Values.redis.sentinel }} | ||
replicas: {{ .Values.redis.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.redis.sentinel }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.redis.sentinel }} | ||
annotations: | ||
checksum/secret: {{ include (print $.Template.BasePath "/redis-secret.yaml") . | sha256sum }} | ||
spec: | ||
initContainers: | ||
- name: config | ||
image: {{ .Values.redis.images.redis }} | ||
command: [ "sh", "-c" ] | ||
env: | ||
- name: REDIS_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: redis-csm-secret | ||
key: password | ||
args: | ||
- | | ||
replicas=$( expr {{ .Values.redis.replicas | int }} - 1) | ||
for i in $(seq 0 $replicas) | ||
do | ||
node=$( echo "{{ .Values.redis.name }}-$i.{{ .Values.redis.name }}" ) | ||
nodes=$( echo "$nodes*$node" ) | ||
done | ||
loop=$(echo $nodes | sed -e "s/"*"/\n/g") | ||
for i in $loop | ||
do | ||
echo "Finding master at $i" | ||
MASTER=$(redis-cli --no-auth-warning --raw -h $i -a $REDIS_PASSWORD info replication | awk '{print $1}' | grep master_host: | cut -d ":" -f2) | ||
if [ "$MASTER" = "" ]; then | ||
echo "Master not found..." | ||
echo "Sleeping 5 seconds for pods to come up..." | ||
sleep 5 | ||
MASTER= | ||
else | ||
echo "Master found at $MASTER..." | ||
break | ||
fi | ||
done | ||
echo "sentinel monitor mymaster $MASTER 6379 2" >> /tmp/master | ||
echo "port 5000 | ||
sentinel resolve-hostnames yes | ||
sentinel announce-hostnames yes | ||
$(cat /tmp/master) | ||
sentinel down-after-milliseconds mymaster 5000 | ||
sentinel failover-timeout mymaster 60000 | ||
sentinel parallel-syncs mymaster 2 | ||
sentinel auth-pass mymaster $REDIS_PASSWORD | ||
" > /etc/redis/sentinel.conf | ||
cat /etc/redis/sentinel.conf | ||
volumeMounts: | ||
- name: redis-config | ||
mountPath: /etc/redis/ | ||
containers: | ||
- name: sentinel | ||
image: {{ .Values.redis.images.redis }} | ||
command: ["redis-sentinel"] | ||
args: ["/etc/redis/sentinel.conf"] | ||
ports: | ||
- containerPort: 5000 | ||
name: {{ .Values.redis.sentinel }} | ||
volumeMounts: | ||
- name: redis-config | ||
mountPath: /etc/redis/ | ||
- name: data | ||
mountPath: /data | ||
volumes: | ||
- name: redis-config | ||
emptyDir: {} | ||
- name: data | ||
emptyDir : {} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.redis.sentinel }} | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- port: 5000 | ||
targetPort: 5000 | ||
name: sentinel | ||
selector: | ||
app: sentinel | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.redis.sentinel }}-svc | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 5000 | ||
targetPort: 5000 | ||
nodePort: 32003 | ||
name: {{ .Values.redis.sentinel }}-svc | ||
selector: | ||
app: {{ .Values.redis.sentinel }} |
Oops, something went wrong.