Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Helm via terraform #132

Open
PavanKumar-Kinesso opened this issue Dec 14, 2023 · 0 comments
Open

Using Helm via terraform #132

PavanKumar-Kinesso opened this issue Dec 14, 2023 · 0 comments

Comments

@PavanKumar-Kinesso
Copy link

PavanKumar-Kinesso commented Dec 14, 2023

Below is the terraform code attempting to use this helm-charts. I'm able to install it successfully but when performing a delete I get timeout issue.

`

----------------------------------------------------------------------------------------------------------

SETUP SENTINEL ONE AGENT

The following sets up SentinelOne agent for the cluster

----------------------------------------------------------------------------------------------------------

resource "kubernetes_namespace" "sentinelone_namespace" {
metadata {
name = "sentinelone"
}
}

resource "kubernetes_secret" "docker_registry_secret" {
metadata {
name = "nexus-imagepull-secret"
namespace = kubernetes_namespace.sentinelone_namespace.metadata[0].name
}

type = "kubernetes.io/dockerconfigjson"

data = {
".dockerconfigjson" = jsonencode({
auths = {
"${var.nexus_registry_base}" = {
"username" = "${var.nexus_username}",
"password" = "${var.nexus_password}",
"email" = "${var.email}",
"auth" = "${local.encoded_nexus_credentials}"
}
}
})
}
}

resource "helm_release" "sentinelone_agent" {

depends_on = [module.eks_core_nodes, module.eks_control_plane]

name = "s1"
namespace = kubernetes_namespace.sentinelone_namespace.metadata[0].name
repository = "https://charts.sentinelone.com"
chart = "s1-agent"
version = "${var.s1_agent_tag}"

set {
name = "secrets.imagePullSecret"
value = kubernetes_secret.docker_registry_secret.metadata[0].name
}

set {
name = "secrets.site_key.value"
value = "${var.s1_site_key}"
}

set {
name = "configuration.repositories.agent"
value = "${var.nexus_registry_base}/xxx-sentinelone/s1agent"
}

set {
name = "configuration.tag.agent"
value = "${var.s1_agent_tag}"
}

set {
name = "configuration.repositories.helper"
value = "${var.nexus_registry_base}/xxx-sentinelone/s1helper"
}

set {
name = "configuration.tag.helper"
value = "${var.s1_agent_tag}"
}

set {
name = "configuration.cluster.name"
value = "${module.eks_control_plane.eks_cluster_name}"
}

set {
name = "helper.nodeSelector.kubernetes\.io/os"
value = "linux"
}

set {
name = "agent.nodeSelector.kubernetes\.io/os"
value = "linux"
}

set {
name = "agent.resources.limits.memory"
value = "1945Mi"
}

set {
name = "agent.resources.limits.cpu"
value = "900m"
}

set {
name = "agent.resources.requests.memory"
value = "800Mi"
}

set {
name = "agent.resources.requests.cpu"
value = "500m"
}

set {
name = "helper.resources.limits.memory"
value = "1945Mi"
}

set {
name = "helper.resources.limits.cpu"
value = "900m"
}

set {
name = "helper.resources.requests.memory"
value = "100Mi"
}

set {
name = "helper.resources.requests.cpu"
value = "100m"
}

set {
name = "configuration.env.agent.heap_trimming_enable"
value = "true"
}

set {
name = "configuration.env.agent.log_level"
value = "debug"
}

set {
name = "agent.tolerations[0].key"
value = "dedicated"
}

set {
name = "agent.tolerations[0].operator"
value = "Equal"
}

set {
name = "agent.tolerations[0].value"
value = "core"
}

set {
name = "agent.tolerations[0].effect"
value = "NoSchedule"
}

set {
name = "helper.tolerations[0].key"
value = "dedicated"
}

set {
name = "helper.tolerations[0].operator"
value = "Equal"
}

set {
name = "helper.tolerations[0].value"
value = "core"
}

set {
name = "helper.tolerations[0].effect"
value = "NoSchedule"
}
}`

I then check pods and come to know that additional uninstall-agent

`
admin@desktop infra % kubectl get pods -n sentinelone -o wide

image

Do we have to add taint for s1-uninstall-agent as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant