Skip to content

Commit

Permalink
add missing env vars to registry viewer deployment spec.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Valdron <[email protected]>
  • Loading branch information
michael-valdron committed Feb 17, 2023
1 parent d6da16a commit 3fabf1b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/registry/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package registry

import (
"fmt"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -231,6 +233,23 @@ func GenerateDeployment(cr *registryv1alpha1.DevfileRegistry, scheme *runtime.Sc
corev1.ResourceMemory: resource.MustParse("256Mi"),
},
},
Env: []corev1.EnvVar{
{
Name: "ANALYTICS_WRITE_KEY",
Value: cr.Spec.Telemetry.RegistryViewerWriteKey,
},
{
Name: "DEVFILE_REGISTRIES",
Value: fmt.Sprintf(`
[
{
"name": "Community",
"url": "http://localhost:8080",
"fqdn": "%s"
}
]`, cr.Status.URL),
},
},
VolumeMounts: []corev1.VolumeMount{
{
Name: "viewer-env-file",
Expand Down

0 comments on commit 3fabf1b

Please sign in to comment.