You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/controller/deployment.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,16 @@ run
26
26
--verbosity <DEBUG|INFO|ERROR>
27
27
```
28
28
29
+
### Env Variables
30
+
31
+
The environment variables below are available in the pods of the init job and the deployment of providers:
32
+
33
+
- the environment variables specified in the [provider resource](#provider-resource), in field `spec.env`;
34
+
- the following predefined environment variables:
35
+
-`OPENMCP_PROVIDER_NAME`: the name of the provider resource;
36
+
-`OPENMCP_PLATFORM_CLUSTER_NAMESPACE`: the namespace on the platform cluster in which the provider is running.
37
+
38
+
29
39
## Provider Resource
30
40
31
41
The provider resources specify how to deploy the providers. They are of the kind `ClusterProvider`, `ServiceProvider`, or `PlatformService`. They are cluster-scoped, and have the following common structure:
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("init"), "Job container args should contain the init command")
65
65
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--environment=test-environment"), "Job container args should contain the environment")
66
66
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--verbosity=DEBUG"), "Job container args should contain the verbosity")
67
-
Expect(job.Spec.Template.Spec.Containers[0].Env).To(HaveLen(1), "Job container should have an environment variables")
67
+
Expect(job.Spec.Template.Spec.Containers[0].Env).To(HaveLen(3), "Job container should have an environment variables")
68
68
Expect(job.Spec.Template.Spec.Containers[0].Env[0].Name).To(Equal("NAME"), "Job container environment variable name should match the provider spec")
69
69
Expect(job.Spec.Template.Spec.Containers[0].Env[0].Value).To(Equal("test-name"), "Job container environment variable value should match the provider spec")
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("run"), "Deployment container args should contain the run command")
83
83
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--environment=test-environment"), "Deployment container args should contain the environment")
84
84
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--verbosity=DEBUG"), "Deployment container args should contain the verbosity")
85
-
Expect(deploy.Spec.Template.Spec.Containers[0].Env).To(HaveLen(1), "Deployment container should have an environment variables")
85
+
Expect(deploy.Spec.Template.Spec.Containers[0].Env).To(HaveLen(3), "Deployment container should have an environment variables")
86
86
Expect(deploy.Spec.Template.Spec.Containers[0].Env[0].Name).To(Equal("NAME"), "Deployment container environment variable name should match the provider spec")
87
87
Expect(deploy.Spec.Template.Spec.Containers[0].Env[0].Value).To(Equal("test-name"), "Deployment container environment variable value should match the provider spec")
0 commit comments