Skip to content

Commit

Permalink
Merge pull request #274 from chronosphereio/ci_update_core_operator_c…
Browse files Browse the repository at this point in the history
…hart

ci: update Core Operator chart
  • Loading branch information
niedbalski authored Jul 24, 2024
2 parents 2f0f6d2 + 82fe452 commit 0ac9b8e
Show file tree
Hide file tree
Showing 19 changed files with 218 additions and 51 deletions.
4 changes: 2 additions & 2 deletions charts/core-crd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: core-crd
description: A Helm chart for Kubernetes
type: application
version: 3.1.0
appVersion: "v3.1.0"
version: 3.2.0
appVersion: "v3.2.0"
maintainers:
- name: Calyptia
email: [email protected]
Expand Down
5 changes: 2 additions & 3 deletions charts/core-crd/tests/core-crd_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ templates:
tests:
- it: checks kind
set:
pipelineServiceType: ClusterIP
pipelineServiceType: ClusterIP
asserts:
- isKind:
of: CustomResourceDefinition
- equal:
- equal:
path: spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.ports.items.properties.serviceType.default
value: ClusterIP

5 changes: 4 additions & 1 deletion charts/core-crd/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Turn this chart off/on
enabled: true

images:
hotReload:
registry: ghcr.io
Expand All @@ -7,7 +10,7 @@ images:
fluentBit:
registry: ghcr.io
repository: calyptia/core/calyptia-fluent-bit
tag: 24.7.3
tag: 24.7.4
pullSecrets: []
ingestCheck:
registry: ghcr.io
Expand Down
4 changes: 2 additions & 2 deletions charts/core-instance/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Calyptia Core Instance chart
home: https://calyptia.com/products/core/
icon: https://storage.googleapis.com/calyptia_public_resources_bucket/logo-darkmode.svg
type: application
version: 3.1.0
appVersion: "v3.1.0"
version: 3.2.0
appVersion: "v3.2.0"
maintainers:
- name: Calyptia
email: [email protected]
Expand Down
24 changes: 16 additions & 8 deletions charts/core-instance/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{{- if .Values.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{- printf "calyptia-core-instance-%s" .Release.Name | trunc 63 | trimSuffix "-" -}}"
namespace: {{ .Release.Namespace }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels:
labels:
app.kubernetes.io/instance: {{ .Values.coreInstance }}
spec:
replicas: {{ default 1 .Values.replicas }}
Expand Down Expand Up @@ -64,13 +65,13 @@ spec:
- name: TOLERATIONS
value: {{ .Values.calyptiaTolerations }}
- name: HTTP_PROXY
value: {{ .Values.http_proxy | quote }}
value: {{ .Values.httpProxy | quote }}
- name: HTTPS_PROXY
value: {{ .Values.https_proxy | quote }}
value: {{ .Values.httpsProxy | quote }}
- name: NO_PROXY
value: {{ .Values.no_proxy | quote }}
value: {{ .Values.noProxy | quote }}
- name: CLOUD_PROXY
value: {{ .Values.cloud_proxy | quote }}
value: {{ .Values.cloudProxy | quote }}
- name: METRICS
value: {{ default false .Values.metrics | quote }}
image: {{ template "fromCloud.image" . }}
Expand Down Expand Up @@ -100,9 +101,15 @@ spec:
- name: NO_TLS_VERIFY
value: {{ default false .Values.notls | quote }}
- name: METRICS_PORT
value: {{ .Values.metricsPort | toYaml }}
value: {{ .Values.metricsPort | toYaml }}
- name: HTTP_PROXY
value: {{ .Values.http_proxy | quote }}
value: {{ .Values.httpProxy | quote }}
- name: HTTPS_PROXY
value: {{ .Values.httpsProxy | quote }}
- name: NO_PROXY
value: {{ .Values.noProxy | quote }}
- name: CLOUD_PROXY
value: {{ .Values.cloudProxy | quote }}
- name: METRICS
value: {{ default false .Values.metrics | quote }}
image: {{ template "toCloud.image" . }}
Expand All @@ -129,3 +136,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/core-instance/templates/pull-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.imageCredentials }}
apiVersion: v1
kind: Secret
Expand All @@ -7,8 +8,9 @@ metadata:
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
name: {{ default "regcreds" .Values.imageCredentials.secretName | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "createImagePullSecret" . }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/core-instance/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -61,5 +62,6 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "instance.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/core-instance/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
Expand All @@ -15,5 +16,6 @@ metadata:
app.kubernetes.io/part-of: operator
calyptia.core: core-operator
name: {{ template "instance.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/core-instance/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -10,14 +11,15 @@ metadata:
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
name: "{{- printf "calyptia-core-instance-metrics-%s" .Release.Name | trunc 63 | trimSuffix "-" -}}"
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
spec:
ports:
- name: metrics
port: {{ .Values.metricsPort | int }}
port: {{ default 15334 .Values.metricsPort | int }}
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/part-of: calyptia
calyptia.core: core-instance
instance: "{{- printf "calyptia-core-instance-%s" .Release.Name -}}"
{{- end }}
15 changes: 5 additions & 10 deletions charts/core-instance/tests/core-instance_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests:
- it: checks kind
set:
coreInstance: ci-1234
cloudTokenSec:
cloudTokenSec:
name: xxx
key: yyy
asserts:
Expand All @@ -19,7 +19,7 @@ tests:
name: test_core-instance
cloudUrl: test_url
coreInstance: ci-1234
cloudTokenSec:
cloudTokenSec:
name: xxx
key: yyy
calyptiaAnnotations: "test=1234,nope=4321"
Expand All @@ -36,8 +36,8 @@ tests:
registry: custom.io
repository: test/ingestcheck
tag: 1.2.3
http_proxy: https
cloud_proxy: cloud
httpProxy: https
cloudProxy: cloud
asserts:
# From Cloud
- equal:
Expand Down Expand Up @@ -91,7 +91,7 @@ tests:
name: HOTRELOAD_IMAGE
- equal:
path: spec.template.spec.containers[0].image
value: custom.io/test/fromCloud:1.2.3
value: custom.io/test/fromCloud:1.2.3
- equal:
path: spec.template.spec.containers[0].env[7]
value:
Expand Down Expand Up @@ -171,11 +171,6 @@ tests:
value:
value: https
name: HTTP_PROXY
- equal:
path: spec.template.spec.containers[1].env[8]
value:
value: "false"
name: METRICS
- it: checks annotations
set:
coreInstance: ci-1234
Expand Down
15 changes: 9 additions & 6 deletions charts/core-instance/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Turn this chart off/on
enabled: true
name: "core-instance"
clusterLogging: false
# If not set then we use the release name
Expand All @@ -20,12 +22,12 @@ images:
fromCloud:
registry: ghcr.io
repository: calyptia/core-operator/sync-from-cloud
tag: 3.1.0
tag: 3.2.0
pullSecrets: []
toCloud:
registry: ghcr.io
repository: calyptia/core-operator/sync-to-cloud
tag: 3.1.0
tag: 3.2.0
pullSecrets: []
hotReload:
registry: ghcr.io
Expand All @@ -48,6 +50,7 @@ podAnnotations: {}
podLabels: {}
nameOverride: ""
fullnameOverride: ""
namespaceOverride: ""
fromCloud:
resources: {}
toCloud:
Expand All @@ -56,10 +59,10 @@ serviceAccount:
create: true
name: ""
annotations: {}
http_proxy: ""
https_proxy: ""
no_proxy: ""
cloud_proxy: ""
httpProxy: ""
httpsProxy: ""
noProxy: ""
cloudProxy: ""
#
## RBAC configuration
## @param rbac.create Specifies whether RBAC resources should be created
Expand Down
4 changes: 2 additions & 2 deletions charts/core-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: Calyptia Core Operator chart
home: https://calyptia.com/products/core/
icon: https://storage.googleapis.com/calyptia_public_resources_bucket/logo-darkmode.svg
type: application
version: 3.1.0
appVersion: "v3.1.0"
version: 3.2.0
appVersion: "v3.2.0"
maintainers:
- name: Calyptia
email: [email protected]
Expand Down
6 changes: 4 additions & 2 deletions charts/core-operator/templates/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -11,7 +12,7 @@ metadata:
calyptia.core: core-operator
control-plane: controller-manager
name: calyptia-core-controller-manager
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
spec:
replicas: {{ default 1 .Values.replicas }}
selector:
Expand Down Expand Up @@ -70,4 +71,5 @@ spec:
runAsNonRoot: true
serviceAccount: {{ template "operator.serviceAccountName" . }}
{{- include "operator.imagePullSecrets" . | nindent 6 }}
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 10
{{- end }}
4 changes: 3 additions & 1 deletion charts/core-operator/templates/pull-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.imageCredentials }}
apiVersion: v1
kind: Secret
Expand All @@ -7,8 +8,9 @@ metadata:
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
name: {{ default "regcreds" .Values.imageCredentials.secretName | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "createImagePullSecret" . }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/core-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down Expand Up @@ -45,5 +46,6 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end -}}
{{- end }}
4 changes: 3 additions & 1 deletion charts/core-operator/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
Expand All @@ -15,5 +16,6 @@ metadata:
app.kubernetes.io/part-of: operator
calyptia.core: core-operator
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/core-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -18,7 +19,7 @@ metadata:
calyptia.core: core-operator
control-plane: controller-manager
name: calyptia-core-controller-manager-metrics-service
namespace: {{ .Release.Namespace }}
namespace: {{ include "common.names.namespace" . | quote }}
spec:
ports:
- name: https
Expand All @@ -31,4 +32,5 @@ spec:
targetPort: http
selector:
calyptia.core: core-operator
control-plane: controller-manager
control-plane: controller-manager
{{- end }}
Loading

0 comments on commit 0ac9b8e

Please sign in to comment.