Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v1alpha1/llamastackdistribution_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions config/crd/bases/llamastack.io_llamastackdistributions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,45 @@ spec:
- name
type: object
type: array
envFrom:
items:
description: EnvFromSource represents the source of a set
of ConfigMaps
properties:
configMapRef:
description: The ConfigMap to select from
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
optional:
description: Specify whether the ConfigMap must
be defined
type: boolean
type: object
x-kubernetes-map-type: atomic
prefix:
description: An optional identifier to prepend to each
key in the ConfigMap. Must be a C_IDENTIFIER.
type: string
secretRef:
description: The Secret to select from
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
optional:
description: Specify whether the Secret must be
defined
type: boolean
type: object
x-kubernetes-map-type: atomic
type: object
type: array
name:
default: llama-stack
type: string
Expand Down
1 change: 1 addition & 0 deletions controllers/resource_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func configureContainerEnvironment(ctx context.Context, r *LlamaStackDistributio

// Finally, add the user provided env vars
container.Env = append(container.Env, instance.Spec.Server.ContainerSpec.Env...)
container.EnvFrom = append(container.EnvFrom, instance.Spec.Server.ContainerSpec.EnvFrom...)
}

// configureContainerMounts sets up volume mounts for the container.
Expand Down
14 changes: 14 additions & 0 deletions controllers/resource_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ func TestBuildContainerSpec(t *testing.T) {
Env: []corev1.EnvVar{
{Name: "TEST_ENV", Value: "test-value"},
},
EnvFrom: []corev1.EnvFromSource{
{SecretRef: &corev1.SecretEnvSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: "TEST-SECRET",
},
}},
},
},
Storage: &llamav1alpha1.StorageSpec{
MountPath: "/custom/path",
Expand All @@ -103,6 +110,13 @@ func TestBuildContainerSpec(t *testing.T) {
{Name: "HF_HOME", Value: "/custom/path"},
{Name: "TEST_ENV", Value: "test-value"},
},
EnvFrom: []corev1.EnvFromSource{
{SecretRef: &corev1.SecretEnvSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: "TEST-SECRET",
},
}},
},
VolumeMounts: []corev1.VolumeMount{{
Name: "lls-storage",
MountPath: "/custom/path",
Expand Down