Skip to content

Commit 5b42c98

Browse files
authored
Merge branch 'intelops:main' into main
2 parents fd81b05 + 90f5cf6 commit 5b42c98

File tree

67 files changed

+4005
-2988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4005
-2988
lines changed

agent/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
type AgentConfigurations struct {
99
SANamespace string `envconfig:"SA_NAMESPACE" default:"default"`
1010
SAName string `envconfig:"SA_NAME" default:"default"`
11-
OutdatedInterval string `envconfig:"OUTDATED_INTERVAL" default:"*/20 * * * *"`
11+
OutdatedInterval string `envconfig:"OUTDATED_INTERVAL" default:"@every 20m"`
1212
GetAllInterval string `envconfig:"GETALL_INTERVAL" default:"*/30 * * * *"`
1313
KubeScoreInterval string `envconfig:"KUBESCORE_INTERVAL" default:"*/40 * * * *"`
1414
RakkessInterval string `envconfig:"RAKKESS_INTERVAL" default:"*/50 * * * *"`

agent/git/pkg/config/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package config
33
// var token string = "UfmrJOYwYCCsgQvxvcfJ3BdI6c8WBbnD"
44
// var natsurl string = "nats://localhost:4222"
55

6-
//Config will have the configuration details
6+
// Config will have the configuration details
77
type Config struct {
88
NatsAddress string `envconfig:"NATS_ADDRESS"`
99
NatsToken string `envconfig:"NATS_TOKEN"`

agent/kubviz/k8smetrics_agent.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ const (
5353
var (
5454
ClusterName string = os.Getenv("CLUSTER_NAME")
5555
token string = os.Getenv("NATS_TOKEN")
56-
natsurl string = os.Getenv("NATS_ADDRESS")
56+
57+
natsurl string = os.Getenv("NATS_ADDRESS")
58+
5759
//for local testing provide the location of kubeconfig
5860
// inside the civo file paste your kubeconfig
5961
// uncomment this line from Dockerfile.Kubviz (COPY --from=builder /workspace/civo /etc/myapp/civo)

charts/agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.1.0
18+
version: 1.1.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/agent/templates/deployment.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,32 @@ spec:
4949
- name: CLUSTER_NAME
5050
value: {{ .Values.clusterName }}
5151
- name: NATS_TOKEN
52+
{{- if .Values.nats.auth.token }}
5253
value: {{ .Values.nats.auth.token }}
54+
{{- else if .Values.nats.auth.secret }}
55+
valueFrom:
56+
secretKeyRef:
57+
name: {{ .Values.nats.auth.secret.name }}
58+
key: {{ .Values.nats.auth.secret.key }}
59+
{{- end }}
5360
- name: NATS_ADDRESS
5461
value: {{ .Values.nats.host }}
5562
- name: SCHEDULING_INTERVAL
56-
value: {{ .Values.schedulingInterval }}
63+
value: "{{ .Values.schedule.schedulingInterval }}"
64+
- name: SCHEDULER_ENABLE
65+
value: "{{ .Values.schedule.enabled }}"
66+
- name: OUTDATED_INTERVAL
67+
value: "{{ .Values.schedule.outdatedInterval }}"
68+
- name: GETALL_INTERVAL
69+
value: "{{ .Values.schedule.getallInterval }}"
70+
- name: KUBESCORE_INTERVAL
71+
value: "{{ .Values.schedule.kubescoreInterval }}"
72+
- name: RAKKESS_INTERVAL
73+
value: "{{ .Values.schedule.rakkessInterval }}"
74+
- name: KUBEPREUPGRADE_INTERVAL
75+
value: "{{ .Values.schedule.kubepreupgradeInterval }}"
76+
- name: TRIVY_INTERVAL
77+
value: "{{ .Values.schedule.trivyInterval }}"
5778
resources:
5879
{{- toYaml .Values.resources | nindent 12 }}
5980
{{- if .Values.git_bridge.enabled }}
@@ -68,7 +89,14 @@ spec:
6889
- name: CLUSTER_NAME
6990
value: {{ .Values.clusterName }}
7091
- name: NATS_TOKEN
92+
{{- if .Values.nats.auth.token }}
7193
value: {{ .Values.nats.auth.token }}
94+
{{- else if .Values.nats.auth.secret }}
95+
valueFrom:
96+
secretKeyRef:
97+
name: {{ .Values.nats.auth.secret.name }}
98+
key: {{ .Values.nats.auth.secret.key }}
99+
{{- end }}
72100
- name: NATS_ADDRESS
73101
value: {{ .Values.nats.host }}
74102
resources:
@@ -86,7 +114,14 @@ spec:
86114
- name: CLUSTER_NAME
87115
value: {{ .Values.clusterName }}
88116
- name: NATS_TOKEN
117+
{{- if .Values.nats.auth.token }}
89118
value: {{ .Values.nats.auth.token }}
119+
{{- else if .Values.nats.auth.secret }}
120+
valueFrom:
121+
secretKeyRef:
122+
name: {{ .Values.nats.auth.secret.name }}
123+
key: {{ .Values.nats.auth.secret.key }}
124+
{{- end }}
90125
- name: NATS_ADDRESS
91126
value: {{ .Values.nats.host }}
92127
resources:

charts/agent/values.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,23 @@ tolerations: []
142142

143143
affinity: {}
144144

145-
schedulingInterval: "24h"
145+
schedule:
146+
enabled: false
147+
schedulingInterval: "24h"
148+
outdatedInterval: "@every 18h"
149+
getallInterval: "@every 19h"
150+
kubescoreInterval: "@every 20h"
151+
rakkessInterval: "@every 21h"
152+
kubepreupgradeInterval: "@every 22h"
153+
trivyInterval: "@every 24h"
146154

147155
clusterName: "kubviz"
148156
nats:
149157
host: kubviz-client-nats
150158
auth:
151-
token: "UfmrJOYwYCCsgQvxvcfJ3BdI6c8WBbnD"
159+
# Use token if you want to provide the token via Helm Values
160+
token: ""
161+
# Use a secret reference if you want to get a token from a secret
162+
secret:
163+
name: ""
164+
key: ""

charts/client/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.1.1
18+
version: 1.1.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
@@ -25,7 +25,7 @@ appVersion: "v1.0.0"
2525
dependencies:
2626
- name: nats
2727
condition: nats.enabled
28-
version: 0.13.4
28+
version: 0.13.5
2929
repository: https://intelops.github.io/kubviz/
3030
- name: clickhouse
3131
condition: clickhouse.enabled

0 commit comments

Comments
 (0)