Skip to content

Commit

Permalink
Load license from secrets, cluster working
Browse files Browse the repository at this point in the history
  • Loading branch information
as51340 committed Aug 8, 2024
1 parent bfcbd25 commit d9b3f88
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions internal/controller/memgraphha_coord.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ func (r *MemgraphHAReconciler) createStatefulSetForCoord(memgraphha *memgraphv1.
"--log-file=/var/log/memgraph/memgraph.log",
"--nuraft-log-file=/var/log/memgraph/memgraph.log",
}
license := "<TODO> add"
organization := "testing-k8"
volumeLibName := fmt.Sprintf("%s-lib-storage", coordName)
volumeLibSize := "1Gi"
volumeLogName := fmt.Sprintf("%s-log-storage", coordName)
Expand Down Expand Up @@ -169,12 +167,26 @@ func (r *MemgraphHAReconciler) createStatefulSetForCoord(memgraphha *memgraphv1.
Args: args,
Env: []corev1.EnvVar{
{
Name: "MEMGRAPH_ENTERPRISE_LICENSE",
Value: license,
Name: "MEMGRAPH_ENTERPRISE_LICENSE",
ValueFrom: &corev1.EnvVarSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: "memgraph-secrets",
},
Key: "MEMGRAPH_ENTERPRISE_LICENSE",
},
},
},
{
Name: "MEMGRAPH_ORGANIZATION_NAME",
Value: organization,
Name: "MEMGRAPH_ORGANIZATION_NAME",
ValueFrom: &corev1.EnvVarSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: "memgraph-secrets",
},
Key: "MEMGRAPH_ORGANIZATION_NAME",
},
},
},
},
VolumeMounts: []corev1.VolumeMount{
Expand Down

0 comments on commit d9b3f88

Please sign in to comment.