diff --git a/pkg/resources/k8sgpt.go b/pkg/resources/k8sgpt.go index 2c333b41..8d01c172 100644 --- a/pkg/resources/k8sgpt.go +++ b/pkg/resources/k8sgpt.go @@ -194,6 +194,14 @@ func GetDeployment(config v1alpha1.K8sGPT) (*appsv1.Deployment, error) { Name: "K8SGPT_BACKEND", Value: string(config.Spec.Backend), }, + { + Name: "XDG_CONFIG_HOME", + Value: "/k8sgpt-data/.config", + }, + { + Name: "XDG_CACHE_HOME", + Value: "/k8sgpt-data/.cache", + }, }, Ports: []v1.ContainerPort{ { @@ -210,6 +218,18 @@ func GetDeployment(config v1alpha1.K8sGPT) (*appsv1.Deployment, error) { v1.ResourceMemory: resource.MustParse("156Mi"), }, }, + VolumeMounts: []v1.VolumeMount{ + { + MountPath: "/k8sgpt-data", + Name: "k8sgpt-vol", + }, + }, + }, + }, + Volumes: []v1.Volume{ + { + VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}, + Name: "k8sgpt-vol", }, }, },