github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/nodemetricsexporter/helm/default.go (about)

     1  package helm
     2  
     3  import (
     4  	"github.com/caos/orbos/pkg/kubernetes/k8s"
     5  	corev1 "k8s.io/api/core/v1"
     6  	"k8s.io/apimachinery/pkg/api/resource"
     7  )
     8  
     9  func DefaultValues(imageTags map[string]string, image string) *Values {
    10  	return &Values{
    11  		FullnameOverride: "node-exporter",
    12  		Image: &Image{
    13  			Repository: image,
    14  			Tag:        imageTags[image],
    15  			PullPolicy: "IfNotPresent",
    16  		},
    17  		Service: &Service{
    18  			Type:        "ClusterIP",
    19  			Port:        9100,
    20  			TargetPort:  9100,
    21  			NodePort:    "",
    22  			Annotations: map[string]string{"prometheus.io/scrape": "true"},
    23  		},
    24  		Prometheus: &Prometheus{
    25  			Monitor: &Monitor{
    26  				Enabled:          false,
    27  				AdditionalLabels: map[string]string{},
    28  				Namespace:        "",
    29  				ScrapeTimeout:    "10s",
    30  			},
    31  		},
    32  		ServiceAccount: &ServiceAccount{
    33  			Create: true,
    34  		},
    35  		SecurityContext: &SecurityContext{
    36  			RunAsNonRoot: true,
    37  			RunAsUser:    65534,
    38  		},
    39  		Rbac: &Rbac{
    40  			Create:     true,
    41  			PspEnabled: true,
    42  		},
    43  		HostNetwork: false,
    44  		Tolerations: []*Toleration{{
    45  			Effect:   "NoSchedule",
    46  			Operator: "Exists",
    47  		}},
    48  		Resources: &k8s.Resources{
    49  			Limits: corev1.ResourceList{
    50  				corev1.ResourceCPU:    resource.MustParse("50m"),
    51  				corev1.ResourceMemory: resource.MustParse("50Mi"),
    52  			},
    53  			Requests: corev1.ResourceList{
    54  				corev1.ResourceCPU:    resource.MustParse("10m"),
    55  				corev1.ResourceMemory: resource.MustParse("10Mi"),
    56  			},
    57  		},
    58  	}
    59  }