mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix(operator): proxy and asset storage secrets handling (#2403)
* fix(operator): proxy and asset storage secrets handling * fix test
This commit is contained in:
parent
30153cff39
commit
5c32fc9c12
@ -183,6 +183,8 @@ func literalsSecretVars(k8sClient kubernetes.ClientInt, desired *Configuration)
|
|||||||
literalsSecretVars["ZITADEL_TWILIO_SID"] = value
|
literalsSecretVars["ZITADEL_TWILIO_SID"] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
literalsSecretVars["ZITADEL_ASSET_STORAGE_ACCESS_KEY_ID"] = ""
|
||||||
|
literalsSecretVars["ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY"] = ""
|
||||||
if desired.AssetStorage != nil {
|
if desired.AssetStorage != nil {
|
||||||
as := desired.AssetStorage
|
as := desired.AssetStorage
|
||||||
if as.AccessKeyID != nil || as.ExistingAccessKeyID != nil {
|
if as.AccessKeyID != nil || as.ExistingAccessKeyID != nil {
|
||||||
@ -200,6 +202,8 @@ func literalsSecretVars(k8sClient kubernetes.ClientInt, desired *Configuration)
|
|||||||
literalsSecretVars["ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY"] = value
|
literalsSecretVars["ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY"] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
literalsSecretVars["HTTP_PROXY"] = ""
|
||||||
|
literalsSecretVars["HTTPS_PROXY"] = ""
|
||||||
if desired.Proxy != nil {
|
if desired.Proxy != nil {
|
||||||
if desired.Proxy.HTTP != nil || desired.Proxy.ExistingHTTP != nil {
|
if desired.Proxy.HTTP != nil || desired.Proxy.ExistingHTTP != nil {
|
||||||
value, err := read.GetSecretValue(k8sClient, desired.Proxy.HTTP, desired.Proxy.ExistingHTTP)
|
value, err := read.GetSecretValue(k8sClient, desired.Proxy.HTTP, desired.Proxy.ExistingHTTP)
|
||||||
|
@ -79,6 +79,20 @@ func GetContainer(
|
|||||||
Key: "ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY",
|
Key: "ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY",
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
|
{Name: "HTTP_PROXY",
|
||||||
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
LocalObjectReference: corev1.LocalObjectReference{Name: secretVarsName},
|
||||||
|
Key: "HTTP_PROXY",
|
||||||
|
},
|
||||||
|
}},
|
||||||
|
{Name: "HTTPS_PROXY",
|
||||||
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
LocalObjectReference: corev1.LocalObjectReference{Name: secretVarsName},
|
||||||
|
Key: "HTTPS_PROXY",
|
||||||
|
},
|
||||||
|
}},
|
||||||
{Name: "SENTRY_DSN",
|
{Name: "SENTRY_DSN",
|
||||||
ValueFrom: &corev1.EnvVarSource{
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
SecretKeyRef: &corev1.SecretKeySelector{
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
@ -86,6 +86,20 @@ func TestDeployment_GetContainer(t *testing.T) {
|
|||||||
Key: "ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY",
|
Key: "ZITADEL_ASSET_STORAGE_SECRET_ACCESS_KEY",
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
|
{Name: "HTTP_PROXY",
|
||||||
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
LocalObjectReference: corev1.LocalObjectReference{Name: secretVarsName},
|
||||||
|
Key: "HTTP_PROXY",
|
||||||
|
},
|
||||||
|
}},
|
||||||
|
{Name: "HTTPS_PROXY",
|
||||||
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
LocalObjectReference: corev1.LocalObjectReference{Name: secretVarsName},
|
||||||
|
Key: "HTTPS_PROXY",
|
||||||
|
},
|
||||||
|
}},
|
||||||
{Name: "SENTRY_DSN",
|
{Name: "SENTRY_DSN",
|
||||||
ValueFrom: &corev1.EnvVarSource{
|
ValueFrom: &corev1.EnvVarSource{
|
||||||
SecretKeyRef: &corev1.SecretKeySelector{
|
SecretKeyRef: &corev1.SecretKeySelector{
|
||||||
|
Loading…
Reference in New Issue
Block a user