Skip to content

Commit

Permalink
feat: support arbitrary uid for openshift environments (#126)
Browse files Browse the repository at this point in the history
* feat: support arbitrary uid for openshift environments

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>

* feat: rename k8sgpt volume and dirs

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>

---------

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
  • Loading branch information
jkleinlercher and AlexsJones committed Jun 5, 2023
1 parent 0e2eb8c commit 10484eb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkg/resources/k8sgpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
{
Expand All @@ -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",
},
},
},
Expand Down

0 comments on commit 10484eb

Please sign in to comment.