Skip to content

Commit

Permalink
Feat/controller log image (#140)
Browse files Browse the repository at this point in the history
* change log shipping image to avoid dockerhub rate limits

* removed SPOTINST_TOKEN_LEGACY and SPOTINST_ACCOUNT_LEGACY and changed SPOTINST_TOKEN and SPOTINST_ACCOUNT to be required

* bump chart version

* bump appVersion to v2.0.60

* change debug to info for logShipper

* bump controller to v2.0.61

* add reporting pod in logshipper

* added namespace of reporting pod to logshipper
  • Loading branch information
TalShafir authored Jun 19, 2024
1 parent c237883 commit 8aa9e4b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
4 changes: 2 additions & 2 deletions charts/ocean-kubernetes-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: ocean-kubernetes-controller
description: A Helm chart for Ocean Kubernetes Controller
type: application
version: 0.1.45
appVersion: 2.0.59
version: 0.1.46
appVersion: 2.0.61
kubeVersion: ">=1.20.0-0"
maintainers:
- name: spotinst
Expand Down
6 changes: 3 additions & 3 deletions charts/ocean-kubernetes-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ocean-kubernetes-controller

![Version: 0.1.45](https://img.shields.io/badge/Version-0.1.45-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.59](https://img.shields.io/badge/AppVersion-2.0.59-informational?style=flat-square)
![Version: 0.1.46](https://img.shields.io/badge/Version-0.1.46-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.61](https://img.shields.io/badge/AppVersion-2.0.61-informational?style=flat-square)

A Helm chart for Ocean Kubernetes Controller.

Expand Down Expand Up @@ -101,10 +101,10 @@ Kubernetes: `>=1.20.0-0`
| livenessProbe.httpGet.port | string | `"readiness"` | |
| livenessProbe.initialDelaySeconds | int | `15` | |
| livenessProbe.periodSeconds | int | `20` | |
| logShipping | object | `{"destination":{"host":"api.spotinst.io","port":443,"tls":true},"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"cr.fluentbit.io/fluent/fluent-bit","tag":"3.0.1"}}` | Log Shipping configuration. |
| logShipping | object | `{"destination":{"host":"api.spotinst.io","port":443,"tls":true},"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/fluent/fluent-bit","tag":"3.0.7"}}` | Log Shipping configuration. |
| logShipping.destination | object | `{"host":"api.spotinst.io","port":443,"tls":true}` | Log shipping destination configuration. |
| logShipping.enabled | bool | `true` | Specifies whether to send the controller logs to Spot for analysis. (Optional) |
| logShipping.image | object | `{"pullPolicy":"IfNotPresent","repository":"cr.fluentbit.io/fluent/fluent-bit","tag":"3.0.1"}` | Specifies the log shipping container image. (Optional) |
| logShipping.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/fluent/fluent-bit","tag":"3.0.7"}` | Specifies the log shipping container image. (Optional) |
| metrics-server.args | list | `["--logtostderr"]` | Arguments to pass to metrics-server on start up. (Optional) |
| metrics-server.deployChart | bool | `true` | Specifies whether the metrics-server chart should be deployed. (Optional) |
| metrics-server.image.pullPolicy | string | `"IfNotPresent"` | |
Expand Down
9 changes: 7 additions & 2 deletions charts/ocean-kubernetes-controller/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ data:
Skip_Empty_Lines On
Refresh_Interval 10
[FILTER]
Name modify
Match *
Add ctrlPod ${POD_NAMESPACE}/${POD_NAME}
# rename msg -> message , level -> l
[FILTER]
Name modify
Expand All @@ -47,13 +52,13 @@ data:
Condition Key_Value_Equals l info
SET l INFO
# debug -> DEBUG
# debug -> INFO
[FILTER]
Name modify
Match *
Condition Key_Value_Equals l debug
SET l DEBUG
SET l INFO
# trace -> TRACE
[FILTER]
Expand Down
22 changes: 8 additions & 14 deletions charts/ocean-kubernetes-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,17 @@ spec:
secretKeyRef:
name: {{ include "ocean-kubernetes-controller.secretName" . }}
key: token
optional: true
- name: SPOTINST_ACCOUNT
valueFrom:
secretKeyRef:
name: {{ include "ocean-kubernetes-controller.secretName" . }}
key: account
optional: true
- name: SPOTINST_TOKEN_LEGACY
valueFrom:
configMapKeyRef:
name: {{ include "ocean-kubernetes-controller.configMapName" . }}
key: spotinst.token
optional: true
- name: SPOTINST_LEADER_ELECTION_ENABLED
valueFrom:
configMapKeyRef:
name: {{ include "ocean-kubernetes-controller.configMapName" . }}
key: leader-election
optional: true
- name: SPOTINST_ACCOUNT_LEGACY
valueFrom:
configMapKeyRef:
name: {{ include "ocean-kubernetes-controller.configMapName" . }}
key: spotinst.account
optional: true
- name: CLUSTER_IDENTIFIER
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -202,6 +188,14 @@ spec:
configMapKeyRef:
name: {{ include "ocean-kubernetes-controller.configMapName" . }}
key: spotinst.cluster-identifier
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: logs
mountPath: /var/log
Expand Down
4 changes: 2 additions & 2 deletions charts/ocean-kubernetes-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ logShipping:

# -- Specifies the log shipping container image. (Optional)
image:
repository: cr.fluentbit.io/fluent/fluent-bit
tag: "3.0.1"
repository: ghcr.io/fluent/fluent-bit
tag: "3.0.7"
pullPolicy: IfNotPresent

# -- Log shipping destination configuration.
Expand Down

0 comments on commit 8aa9e4b

Please sign in to comment.