Skip to content

Commit

Permalink
updated helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlhansen committed Aug 1, 2024
1 parent fa0cd16 commit cd19bc2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM ${ARCH}alpine:3.18 as container

WORKDIR /app
COPY --from=builder /app/src/idrac_exporter /app/bin/
RUN apk add -U bash gettext
RUN apk add -U bash
COPY default-config.yml /etc/prometheus/idrac.yml
COPY entrypoint.sh /app
ENTRYPOINT ["/app/entrypoint.sh"]
4 changes: 0 additions & 4 deletions charts/idrac-exporter/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ metadata:
labels:
{{- include "idrac-exporter.labels" . | nindent 4 }}
stringData:
{{- if default .Values.idracConfigIsTemplate false }}
idrac.yml.template: {{ tpl .Values.idracConfig . | quote }}
{{- else }}
idrac.yml: {{ tpl .Values.idracConfig . | quote }}
{{ end }}
{{ end }}
22 changes: 15 additions & 7 deletions charts/idrac-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "idrac-exporter.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.extraArgs }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand All @@ -42,14 +50,14 @@ spec:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- with .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.env }}
env:
{{- range .Values.env }}
- {{ toYaml . | indent 14 | trim }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end -}}
{{- if or (.Values.idracConfig) (.Values.volumeMounts) }}
volumeMounts:
{{- end }}
Expand Down
18 changes: 8 additions & 10 deletions charts/idrac-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,16 @@ tolerations: []

affinity: {}

# If true idracConfig mounts as "idrac.yml.template" to be used with environment
# variables in entrypoint.sh for container deployments.
idracConfigIsTemplate: false
extraArgs: []

idracConfig: |
address: 0.0.0.0 # Running in a container, this makes sense
port: 9348 # Listen port
timeout: 60 # HTTP timeout (in seconds) for Redfish API calls
address: 0.0.0.0
port: 9348
timeout: 60
hosts:
default:
username: IDRAC_USERNAME
password: IDRAC_PASSWORD
username: USERNAME
password: PASSWORD
metrics:
system: true
sensors: true
Expand All @@ -100,9 +98,9 @@ idracConfig: |
network: true
env: []
# - name: IDRAC_USERNAME
# - name: CONFIG_DEFAULT_USERNAME
# value: root
# - name: IDRAC_PASSWORD
# - name: CONFIG_DEFAULT_PASSWORD
# valueFrom:
# secretKeyRef:
# name: my-external-idrac-secret
Expand Down

0 comments on commit cd19bc2

Please sign in to comment.