Skip to content

Commit

Permalink
Merge branch 'main' into drochow/issue-391/prep
Browse files Browse the repository at this point in the history
  • Loading branch information
drochow authored Nov 21, 2024
2 parents 17c0c09 + 41ebcb8 commit 08b4189
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
45 changes: 22 additions & 23 deletions scanner/k8s-assets/chart/k8s-assets-scanner/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
spec:
template:
spec:
serviceAccountName: {{ include "k8s-assets-scanner.serviceAccountName" . }}
volumes:
- name: config-volume
configMap:
Expand All @@ -23,28 +24,26 @@ spec:
- name: config-volume
mountPath: "{{ .Values.scanner.config_mount_path }}"
readOnly: true
command:
- /heureka-scanner-k8s-assets
env:
- name: HEUREKA_API_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: api_token
- name: HEUREKA_URL
value: {{ .Values.scanner.heureka_url }}
- name: SUPPORT_GROUP_LABEL
value: {{ .Values.scanner.support_group_label }}
- name: SERVICE_CCRN_LABEL
value: {{ .Values.scanner.service_label }}
- name: SCANNER_TIMEOUT
value: {{ .Values.scanner.scanner_timeout }}
- name: HEUREKA_CLUSTER_NAME
value: {{ .Values.scanner.k8s_cluster_name }}
- name: HEUREKA_CLUSTER_REGION
value: {{ .Values.scanner.k8s_cluster_region }}
- name: KUBE_CONFIG_TYPE
value: "in-cluster"
args:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
- name: HEUREKA_API_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: api_token
- name: HEUREKA_URL
value: {{ .Values.scanner.heureka_url }}
- name: SUPPORT_GROUP_LABEL
value: {{ .Values.scanner.support_group_label }}
- name: SERVICE_CCRN_LABEL
value: {{ .Values.scanner.service_label }}
- name: SCANNER_TIMEOUT
value: {{ .Values.scanner.scanner_timeout }}
- name: HEUREKA_CLUSTER_NAME
value: {{ .Values.scanner.k8s_cluster_name }}
- name: HEUREKA_CLUSTER_REGION
value: {{ .Values.scanner.k8s_cluster_region }}
- name: KUBE_CONFIG_TYPE
value: "in-cluster"
restartPolicy: OnFailure
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

# templates/rbac.yaml
{{- if .Values.serviceAccount.create -}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
10 changes: 5 additions & 5 deletions scanner/k8s-assets/chart/k8s-assets-scanner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Declare variables to be passed into your templates.

scanner:
api_token: "my_token"
heureka_url: "api.heureka.greenhouse-qa.eu-nl-1.cloud.sap"
api_token: ""
heureka_url: ""
config_mount_path: "/etc/heureka/config/k8s-assets-scanner"
schedule: "0 * * * *"
support_group_label: "ccloud/support-group"
Expand All @@ -18,15 +18,15 @@ image:
repository: ghcr.io/cloudoperators/heureka-scanner-k8s-assets
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "main"
tag: "latest"

serviceAccount:
# Specifies whether a service account should be created
create: false
create: true
# Automatically mount a ServiceAccount's API credentials?
automount: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
name: "heureka-k8s-assets-scanner-sa"

0 comments on commit 08b4189

Please sign in to comment.