Compare commits

...

16 Commits
1.9.0 ... 1.91c

Author SHA1 Message Date
David Shay
e1db60b2b5 Requested changes to multi-arch build 2022-01-14 09:39:48 -05:00
David Shay
f3295b99ef Added support for multi-arch image build 2022-01-12 10:31:26 -05:00
Daniel Simionato
178ba93b5a Add ability to define ds annotations in helm chart 2022-01-12 07:25:11 +01:00
Christian Kotzbauer
f3ed0087d2 Merge pull request #493 from weaveworks/dependabot/github_actions/helm/chart-testing-action-2.2.0
build(deps): bump helm/chart-testing-action from 2.1.0 to 2.2.0
2022-01-07 20:41:40 +01:00
dependabot[bot]
71a273a14c build(deps): bump helm/chart-testing-action from 2.1.0 to 2.2.0
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: helm/chart-testing-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-07 17:02:55 +00:00
Christian Kotzbauer
2b36eab0f8 Merge pull request #492 from weaveworks/feature/release-1.9.1
Prepare release 1.9.1
2022-01-06 19:13:05 +01:00
Christian Kotzbauer
aefd901b4e prepare release 1.9.1
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-01-06 10:06:45 +01:00
Christian Kotzbauer
91b01b5524 Merge pull request #489 from dkulchinsky/dannyk/remove_env_values_from_logs
don't print env variable values in the logs (some are sensitive)
2022-01-05 05:55:28 +01:00
Christian Kotzbauer
f1255bff91 Merge pull request #490 from dkulchinsky/dannyk/deprecation_fix
small fix in deprecation log messages
2022-01-04 19:03:46 +01:00
Danny Kulchinsky
22a76f0da2 small fix in deprecation log messages 2022-01-04 12:23:22 -05:00
Danny Kulchinsky
b52a9587f3 don't print env variable values in the logs (some are sensitive) 2022-01-04 10:55:46 -05:00
Christian Kotzbauer
a6e1cf8191 Merge pull request #487 from weaveworks/release-1.9.0
Release 1.9.0
2021-12-17 14:14:42 +01:00
Christian Kotzbauer
d7576dce0f Merge pull request #456 from span/jsonlogging-chart
Jsonlogging chart
2021-12-17 10:33:58 +01:00
Christian Kotzbauer
661af3b042 prepare 1.9.0 2021-12-17 10:32:21 +01:00
Daniel Kvist
eafe2c3d98 Update README.md
Add default value for logformat.
2021-10-30 04:35:53 +02:00
Daniel Kvist
e4f1c7358c Add chart configuration for json logging 2021-10-28 10:49:44 +02:00
12 changed files with 79 additions and 17 deletions

View File

@@ -36,10 +36,24 @@ jobs:
username: weave-ghcr-bot
password: ${{ secrets.KURED_WEAVE_GHCR_BOT_TOKEN }}
- name: Build image
run: |
make DH_ORG="${{ github.repository_owner }}" image
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Publish image
run: |
make DH_ORG="${{ github.repository_owner }}" publish-image
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Find current tag version
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
id: tags
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
file: cmd/kured/Dockerfile.multi
platforms: linux/arm64, linux/amd64
push: true
tags: |
docker.io/${{ GITHUB.REPOSITORY }}:main-${{ steps.tags.outputs.sha_short }}
ghcr.io/${{ GITHUB.REPOSITORY }}:main-${{ steps.tags.outputs.sha_short }}

View File

@@ -32,7 +32,7 @@ jobs:
# Helm is already present in github actions, so do not re-install it
- name: Setup chart testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.2.0
- name: Create default kind cluster
uses: helm/kind-action@v1.2.0

View File

@@ -44,6 +44,20 @@ jobs:
username: weave-ghcr-bot
password: ${{ secrets.KURED_WEAVE_GHCR_BOT_TOKEN }}
- name: Publish image
run: |
make DH_ORG="${{ github.repository_owner }}" VERSION="${{ steps.tags.outputs.version }}" publish-image
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
file: cmd/kured/Dockerfile.multi
platforms: linux/arm64, linux/amd64, linux/arm/v7, linux/arm/v6, linux/386
push: true
tags: |
docker.io/${{ GITHUB.REPOSITORY }}:${{ steps.tags.outputs.version }}
ghcr.io/${{ GITHUB.REPOSITORY }}:${{ steps.tags.outputs.version }}

View File

@@ -49,6 +49,7 @@ server:
| kured | kubectl | k8s.io/client-go | k8s.io/apimachinery | expected kubernetes compatibility |
|-------|---------|------------------|---------------------|-----------------------------------|
| main | 1.22.4 | v0.22.4 | v0.22.4 | 1.21.x, 1.22.x, 1.23.x |
| 1.9.1 | 1.22.4 | v0.22.4 | v0.22.4 | 1.21.x, 1.22.x, 1.23.x |
| 1.8.1 | 1.21.4 | v0.21.4 | v0.21.4 | 1.20.x, 1.21.x, 1.22.x |
| 1.7.0 | 1.20.5 | v0.20.5 | v0.20.5 | 1.19.x, 1.20.x, 1.21.x |
| 1.6.1 | 1.19.4 | v0.19.4 | v0.19.4 | 1.18.x, 1.19.x, 1.20.x |

View File

@@ -1,8 +1,8 @@
apiVersion: v1
appVersion: "1.8.2"
appVersion: "1.9.1"
description: A Helm chart for kured
name: kured
version: 2.10.2
version: 2.11.2
home: https://github.com/weaveworks/kured
maintainers:
- name: ckotzbauer

View File

@@ -36,12 +36,13 @@ The following changes have been made compared to the stable chart:
| Config | Description | Default |
| ------ | ----------- | ------- |
| `image.repository` | Image repository | `weaveworks/kured` |
| `image.tag` | Image tag | `1.8.2` |
| `image.tag` | Image tag | `1.9.1` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Image pull secrets | `[]` |
| `updateStrategy` | Daemonset update strategy | `RollingUpdate` |
| `maxUnavailable` | The max pods unavailable during a rolling update | `1` |
| `podAnnotations` | Annotations to apply to pods (eg to add Prometheus annotations) | `{}` |
| `dsAnnotations` | Annotations to apply to the kured DaemonSet | `{}` |
| `extraArgs` | Extra arguments to pass to `/usr/bin/kured`. See below. | `{}` |
| `extraEnvVars` | Array of environment variables to pass to the daemonset. | `{}` |
| `configuration.lockTtl` | cli-parameter `--lock-ttl` | `0` |
@@ -71,6 +72,7 @@ The following changes have been made compared to the stable chart:
| `configuration.startTime` | cli-parameter `--start-time` | `""` |
| `configuration.timeZone` | cli-parameter `--time-zone` | `""` |
| `configuration.annotateNodes` | cli-parameter `--annotate-nodes` | `false` |
| `configuration.logFormat` | cli-parameter `--log-format` | `"text"` |
| `configuration.preferNoScheduleTaint` | Taint name applied during pending node reboot | `""` |
| `rbac.create` | Create RBAC roles | `true` |
| `serviceAccount.create` | Create a service account | `true` |

View File

@@ -5,6 +5,12 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "kured.labels" . | nindent 4 }}
{{- if .Values.dsAnnotations }}
annotations:
{{- range $key, $value := .Values.dsAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
updateStrategy:
type: {{ .Values.updateStrategy }}
@@ -136,6 +142,9 @@ spec:
{{- if .Values.configuration.preferNoScheduleTaint }}
- --prefer-no-schedule-taint={{ .Values.configuration.preferNoScheduleTaint }}
{{- end }}
{{- if .Values.configuration.logFormat }}
- --log-format={{ .Values.configuration.logFormat }}
{{- end }}
{{- range $key, $value := .Values.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}

View File

@@ -28,3 +28,4 @@ configuration:
# timeZone: "" # time-zone to use (valid zones from "time" golang package)
# annotateNodes: false # enable 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' node annotations to signify kured reboot operations
# lockReleaseDelay: "5m" # hold lock after reboot by this amount of time (default 0, disabled)
# logFormat: "text" # log format specified as text or json, defaults to text

View File

@@ -9,6 +9,7 @@ updateStrategy: RollingUpdate
maxUnavailable: 1
podAnnotations: {}
dsAnnotations: {}
extraArgs: {}
@@ -50,6 +51,7 @@ configuration:
annotateNodes: false # enable 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' node annotations to signify kured reboot operations
lockReleaseDelay: 0 # hold lock after reboot by this amount of time (default 0, disabled)
preferNoScheduleTaint: "" # Taint name applied during pending node reboot (to prevent receiving additional pods from other rebooting nodes). Disabled by default. Set e.g. to "weave.works/kured-node-reboot" to enable tainting.
logFormat: "text" # log format specified as text or json, defaults to text
rbac:
create: true

View File

@@ -0,0 +1,19 @@
FROM --platform=$BUILDPLATFORM golang:bullseye AS build
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
ENV GOVARIANT=$TARGETVARIANT
WORKDIR /src
COPY . .
RUN go list -f '{{join .Deps "\n"}}' ./cmd/kured | grep -v /vendor/ | xargs go list -f '{{if not .Standard}}{{ $dep := . }}{{range .GoFiles}}{{$dep.Dir}}/{{.}} {{end}}{{end}}'
RUN CGO_ENABLED=0 go build -o cmd/kured/kured cmd/kured/*.go
FROM --platform=$TARGETPLATFORM alpine:3.15 as bin
RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata
COPY --from=build /src/cmd/kured/kured /usr/bin/kured
ENTRYPOINT ["/usr/bin/kured"]

View File

@@ -197,10 +197,10 @@ func flagCheck(cmd *cobra.Command, args []string) {
log.Warnf("Deprecated flag(s). Please use --notify-url flag instead.")
trataURL, err := url.Parse(slackHookURL)
if err != nil {
log.Warnf("slack-hook-url is not properly formatted...no notification will be sent: %v\n", err)
log.Warnf("slack-hook-url is not properly formatted... no notification will be sent: %v\n", err)
}
if len(strings.Split(strings.Trim(trataURL.Path, "/services/"), "/")) != 3 {
log.Warnf("slack-hook-url is not properly formatted...no notification will be sent: %v\n", err)
log.Warnf("slack-hook-url is not properly formatted... no notification will be sent: unexpected number of / in URL\n")
} else {
notifyURL = fmt.Sprintf("slack://%s", strings.Trim(trataURL.Path, "/services/"))
}
@@ -229,7 +229,7 @@ func bindFlags(cmd *cobra.Command, v *viper.Viper) {
// Apply the viper config value to the flag when the flag is not set and viper has a value
if !f.Changed && v.IsSet(f.Name) {
val := v.Get(f.Name)
log.Infof("Binding %s command flag to environment variable: %s=%s", f.Name, flagToEnvVar(f.Name), fmt.Sprintf("%v", val))
log.Infof("Binding %s command flag to environment variable: %s", f.Name, flagToEnvVar(f.Name))
cmd.Flags().Set(f.Name, fmt.Sprintf("%v", val))
}
})

View File

@@ -29,7 +29,7 @@ spec:
restartPolicy: Always
containers:
- name: kured
image: docker.io/weaveworks/kured:1.8.2
image: docker.io/weaveworks/kured:1.9.1
# If you find yourself here wondering why there is no
# :latest tag on Docker Hub,see the FAQ in the README
imagePullPolicy: IfNotPresent