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

[feature-1091]: Expose proxy-server via cluster node IP and use local storage for Redis by default #353

Merged
merged 6 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
27 changes: 27 additions & 0 deletions charts/csm-authorization/charts/redis/templates/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,31 @@ spec:
persistentVolumeClaim:
claimName: redis-primary-pv-claim
---
{{- if not (.Values.storageClass) }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csm-authorization-local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

---
apiVersion: v1
kind: PersistentVolume
metadata:
name: csm-authorization-redis
spec:
capacity:
storage: 8Gi
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need 8Gi?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not but I think it's ok to allow this space. This is what has been configured since the beginning of Authorization.

volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
storageClassName: csm-authorization-local-storage
hostPath:
path: /csm-authorization/redis
{{- end}}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -50,6 +75,8 @@ spec:
- ReadWriteOnce
{{- if (.Values.storageClass) }}
storageClassName: {{.Values.storageClass }}
{{ else }}
storageClassName: csm-authorization-local-storage
{{- end}}
resources:
requests:
Expand Down
13 changes: 11 additions & 2 deletions charts/csm-authorization/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
secretName: user-provided-tls
{{- else }}
secretName: karavi-selfsigned-tls
{{- end}}
{{- end }}
rules:
- host: {{ .Values.authorization.hostname }}
http:
Expand All @@ -48,4 +48,13 @@ spec:
port:
number: 8080
{{- end }}
{{- end}}
{{- end }}
- http:
shaynafinocchiaro marked this conversation as resolved.
Show resolved Hide resolved
paths:
- backend:
service:
name: proxy-server
port:
number: 8080
path: /
pathType: Prefix
12 changes: 7 additions & 5 deletions charts/csm-authorization/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ authorization:
opa: openpolicyagent/opa
opaKubeMgmt: openpolicyagent/kube-mgmt:0.11

# base hostname for the ingress rules that expose the services
# the proxy-server ingress will use this hostname
# the role-service ingress will use role.hostname
# proxy-server ingress will use this hostname
# NOTE: additional hostnames can be configured in authorization.proxyServerIngress.hosts
# NOTE: proxy-server ingress is configured to accept IP address connections so hostnames are not required
hostname: csm-authorization.com

# log level for csm-authorization
Expand Down Expand Up @@ -52,5 +52,7 @@ redis:
redis: redis:6.0.8-alpine
commander: rediscommander/redis-commander:latest

# set the storageClass for redis to use. otherwise, the default storage class is used
# storageClass: local-storage
# by default, csm-authorization will deploy a local (https://kubernetes.io/docs/concepts/storage/storage-classes/#local) volume for redis
# to use a different storage class for redis, uncomment the following line and specify the name of the storage class
# NOTE: the storage class must NOT be a storage class provisioned by a CSI driver to be configured with this instance of CSM Authorization
#storageClass:
Loading