Skip to content

Commit

Permalink
use default opni image entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kralicky committed Nov 11, 2022
1 parent 3a0d644 commit 276378b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: client
command:
- opni
args:
- client
- --health-probe-bind-address=:7081
- --metrics-bind-address=127.0.0.1:7080
{{- if .Values.bootstrapInCluster.enabled }}
- --central
{{- end }}
env:
- name: POD_NAME
valueFrom:
Expand All @@ -103,12 +107,6 @@ spec:
fieldPath: metadata.namespace
- name: NODE_FEATURE_DISCOVERY_IMAGE
value: k8s.gcr.io/nfd/node-feature-discovery:v0.7.0
args:
- --health-probe-bind-address=:7081
- --metrics-bind-address=127.0.0.1:7080
{{- if .Values.bootstrapInCluster.enabled }}
- --central
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default $versionTag }}"
Expand Down
10 changes: 4 additions & 6 deletions packages/opni/opni/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: manager
command:
- opni
args:
- manager
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
env:
- name: POD_NAME
valueFrom:
Expand All @@ -47,10 +49,6 @@ spec:
fieldPath: metadata.namespace
- name: NODE_FEATURE_DISCOVERY_IMAGE
value: k8s.gcr.io/nfd/node-feature-discovery:v0.7.0
args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default $versionTag }}"
Expand Down
7 changes: 4 additions & 3 deletions pkg/resources/gateway/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package gateway
import (
"bytes"
"fmt"
"path"

"github.com/rancher/opni/pkg/alerting/routing"
"gopkg.in/yaml.v3"
"path"

"github.com/rancher/opni/apis/core/v1beta1"

Expand Down Expand Up @@ -181,8 +182,8 @@ func (r *Reconciler) alerting() []resources.Resource {
// Defaults to
// "--config.file=/opt/bitnami/alertmanager/conf/config.yml",
// "--storage.path=/opt/bitnami/alertmanager/data"
Command: []string{"opni", "alertmanager"},
Args: []string{
"alertmanager",
fmt.Sprintf("--cluster.listen-address=0.0.0.0:%d", r.spec.Alerting.ClusterPort),
fmt.Sprintf("--config.file=%s", path.Join(configMountPath, shared.AlertManagerConfigKey)),
fmt.Sprintf("--storage.path=%s", dataMountPath),
Expand Down Expand Up @@ -312,8 +313,8 @@ func (r *Reconciler) alerting() []resources.Resource {
// Defaults to
// "--config.file=/opt/bitnami/alertmanager/conf/config.yml",
// "--storage.path=/opt/bitnami/alertmanager/data"
Command: []string{"opni", "alertmanager"},
Args: []string{
"alertmanager",
fmt.Sprintf("--config.file=%s", path.Join(configMountPath, shared.AlertManagerConfigKey)),
fmt.Sprintf("--storage.path=%s", dataMountPath),
fmt.Sprintf("--log.level=%s", "info"),
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/monitoring/cortex/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ func (r *Reconciler) cortexWorkloadPodTemplate(
return corev1.PullAlways
}
}(),
Command: []string{"opni", "cortex"},
Args: append([]string{
"cortex",
"-target=" + target,
"-config.file=/etc/cortex/cortex.yaml",
}, options.extraArgs...),
Expand Down

0 comments on commit 276378b

Please sign in to comment.