Add K8S_NAMESPACE env to EdgeFS containers (#3098)

Add K8S_NAMESPACE env to EdgeFS containers
This commit is contained in:
Alexander Trost authored and GitHub committed 2019-05-02 19:42:30 +02:00
commit a15c9efb06
7 files changed
+42 -2

No files matched your search

@@ -146,6 +146,10 @@ func (c *Cluster) makeAuditdContainer(containerImage string) v1.Container {
},
},
},
{
Name: "K8S_NAMESPACE",
Value: c.Namespace,
},
},
SecurityContext: securityContext,
VolumeMounts: volumeMounts,
@@ -281,6 +285,10 @@ func (c *Cluster) makeDaemonContainer(containerImage string, dro edgefsv1beta1.D
},
},
},
{
Name: "K8S_NAMESPACE",
Value: c.Namespace,
},
},
SecurityContext: securityContext,
Resources: c.resources,
+1 -1
View File
@@ -239,7 +239,7 @@ func (c *ISCSIController) iscsiContainer(svcname, name, containerImage string, i
},
},
{
Name: "KUBERNETES_NAMESPACE",
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
+1 -1
View File
@@ -296,7 +296,7 @@ func (c *ISGWController) isgwContainer(svcname, name, containerImage string, isg
},
},
{
Name: "KUBERNETES_NAMESPACE",
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
+8
View File
@@ -226,6 +226,14 @@ func (c *NFSController) nfsContainer(svcname, name, containerImage string, nfsSp
},
},
},
{
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
},
},
},
},
SecurityContext: securityContext,
Resources: nfsSpec.Resources,
+8
View File
@@ -298,6 +298,14 @@ func (c *S3Controller) s3Container(svcname, name, containerImage, args string, s
},
},
},
{
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
},
},
},
{
Name: "EFSS3_HTTP_PORT",
Value: fmt.Sprint(s3Spec.Port),
+8
View File
@@ -268,6 +268,14 @@ func (c *S3XController) s3xContainer(svcname, name, containerImage string, s3xSp
},
},
},
{
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
},
},
},
{
Name: "EFSS3X_HTTP_PORT",
Value: fmt.Sprint(s3xSpec.Port),
+8
View File
@@ -284,6 +284,14 @@ func (c *SWIFTController) swiftContainer(svcname, name, containerImage, args str
},
},
},
{
Name: "K8S_NAMESPACE",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
FieldPath: "metadata.namespace",
},
},
},
{
Name: "EFSSWIFT_HTTP_PORT",
Value: fmt.Sprint(swiftSpec.Port),