Skip to content

Commit

Permalink
Merge pull request #1173 from kuberhealthy/cleanup
Browse files Browse the repository at this point in the history
Release 2.8.0
  • Loading branch information
integrii committed Dec 23, 2023
2 parents 9d2e6ed + cf4830d commit 6c9dac2
Show file tree
Hide file tree
Showing 60 changed files with 578 additions and 514 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/gosec-latest-checks.yaml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Release

on:
push:
tags:
- 'v*.*.*'

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Extract tag name
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: cmd/kuberhealthy/Dockerfile
push: true
tags: kuberhealthy/kuberhealthy:${{ env.TAG }}
platforms: linux/amd64,linux/arm64

create-release:
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion cmd/ami-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-ami-check"
IMAGE := "kuberhealthy/ami-check"
TAG := "v1.4.0"
TAG := "v1.4.1"
2 changes: 1 addition & 1 deletion cmd/ami-check/ami-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
podSpec:
containers:
- name: ami
image: kuberhealthy/ami-check:v1.4.0
image: kuberhealthy/ami-check:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: AWS_REGION
Expand Down
2 changes: 1 addition & 1 deletion cmd/cronjob-checker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-cronjob-checker"
IMAGE := "kuberhealthy/cronjob-checker"
TAG := "v2.1.0"
TAG := "v2.1.1"
2 changes: 1 addition & 1 deletion cmd/cronjob-checker/cronjob-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
serviceAccountName: cronjob-checker
containers:
- name: cronjob-checker
image: kuberhealthy/cronjob-checker:v2.1.0
image: kuberhealthy/cronjob-checker:v2.1.1
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion cmd/daemonset-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-daemonset-check"
IMAGE := "kuberhealthy/daemonset-check"
TAG := "v3.3.0"
TAG := "v3.3.1"
2 changes: 1 addition & 1 deletion cmd/daemonset-check/daemonset-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
# value: "kubernetes.io/hostname=test"
#- name: NODE_SELECTOR
# value: "kubernetes.io/hostname=test"
image: kuberhealthy/daemonset-check:v3.3.0
image: kuberhealthy/daemonset-check:v3.3.1
imagePullPolicy: IfNotPresent
name: main
resources:
Expand Down
2 changes: 1 addition & 1 deletion cmd/deployment-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-deployment-check"
IMAGE := "kuberhealthy/deployment-check"
TAG := "v1.9.0"
TAG := "v1.9.1"
2 changes: 1 addition & 1 deletion cmd/deployment-check/deployment-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
podSpec:
containers:
- name: deployment
image: kuberhealthy/deployment-check:v1.9.0
image: kuberhealthy/deployment-check:v1.9.1
imagePullPolicy: IfNotPresent
env:
- name: CHECK_DEPLOYMENT_REPLICAS
Expand Down
19 changes: 6 additions & 13 deletions cmd/deployment-check/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,22 +322,16 @@ func createContainerConfig(imageURL string) corev1.Container {
}

// Make a TCP socket for the probe handler.
tcpSocket := corev1.TCPSocketAction{
Port: intstr.IntOrString{
IntVal: checkContainerPort,
StrVal: strconv.Itoa(int(checkContainerPort)),
},
}

// Make a handler for the probes.
handler := corev1.Handler{
TCPSocket: &tcpSocket,
}
// tcpSocket := corev1.TCPSocketAction{
// Port: intstr.IntOrString{
// IntVal: checkContainerPort,
// StrVal: strconv.Itoa(int(checkContainerPort)),
// },
// }

// Make liveness and readiness probes.
// Make the liveness probe here.
liveProbe := corev1.Probe{
Handler: handler,
InitialDelaySeconds: defaultProbeInitialDelaySeconds,
TimeoutSeconds: defaultProbeTimeoutSeconds,
PeriodSeconds: defaultProbePeriodSeconds,
Expand All @@ -347,7 +341,6 @@ func createContainerConfig(imageURL string) corev1.Container {

// Make the readiness probe here.
readyProbe := corev1.Probe{
Handler: handler,
InitialDelaySeconds: defaultProbeInitialDelaySeconds,
TimeoutSeconds: defaultProbeTimeoutSeconds,
PeriodSeconds: defaultProbePeriodSeconds,
Expand Down
2 changes: 1 addition & 1 deletion cmd/dns-resolution-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-dns-resolution-check"
IMAGE := "kuberhealthy/dns-resolution-check"
TAG := "v1.5.0"
TAG := "v1.5.1"
2 changes: 1 addition & 1 deletion cmd/dns-resolution-check/externalDNSStatusCheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: kuberhealthy/dns-resolution-check:v1.5.0
image: kuberhealthy/dns-resolution-check:v1.5.1
imagePullPolicy: IfNotPresent
name: main
resources:
Expand Down
2 changes: 1 addition & 1 deletion cmd/dns-resolution-check/internalDNSStatusCheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: kuberhealthy/dns-resolution-check:v1.5.0
image: kuberhealthy/dns-resolution-check:v1.5.1
imagePullPolicy: IfNotPresent
name: main
resources:
Expand Down
2 changes: 1 addition & 1 deletion cmd/http-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-http-check"
IMAGE := "kuberhealthy/http-check"
TAG := "v1.5.0"
TAG := "v1.5.1"
2 changes: 1 addition & 1 deletion cmd/http-check/http-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
podSpec:
containers:
- name: https
image: kuberhealthy/http-check:v1.5.0
image: kuberhealthy/http-check:v1.5.1
imagePullPolicy: IfNotPresent
env:
- name: CHECK_URL
Expand Down
2 changes: 1 addition & 1 deletion cmd/http-content-check/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BUILDER := http-content-check
IMAGE := kuberhealthy/${BUILDER}
TAG := v1.5.0
TAG := v1.5.1

include ../../Makefile
2 changes: 1 addition & 1 deletion cmd/http-content-check/http-content-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
timeout: 2m # After this much time, Kuberhealthy will kill your check and consider it "failed"
podSpec: # The exact pod spec that will run. All normal pod spec is valid here.
containers:
- image: kuberhealthy/http-content-check:v1.5.0 # The image of the check you just pushed
- image: kuberhealthy/http-content-check:v1.5.1 # The image of the check you just pushed
imagePullPolicy: IfNotPresent # uses local image if present
name: main
env:
Expand Down
4 changes: 2 additions & 2 deletions cmd/image-download-check/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
docker build -t kuberhealthy/image-download-check:v0.0.1 -f Dockerfile ../../
docker build -t kuberhealthy/image-download-check:v0.1.0 -f Dockerfile ../../

push:
docker push kuberhealthy/image-download-check:v0.0.1
docker push kuberhealthy/image-download-check:v0.1.0
2 changes: 1 addition & 1 deletion cmd/image-download-check/image-download-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
podSpec:
containers:
- name: image-download-check
image: kuberhealthy/image-download-check:v0.0.1
image: kuberhealthy/image-download-check:v0.1.0
imagePullPolicy: IfNotPresent
env:
- name: FULL_IMAGE_URL
Expand Down
2 changes: 1 addition & 1 deletion cmd/kiam-check/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include ../../Makefile

BUILDER := "dockerx-kiam-check"
IMAGE := "kuberhealthy/kiam-check"
TAG := "v1.3.0"
TAG := "v1.3.1"
2 changes: 1 addition & 1 deletion cmd/kiam-check/kiam-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
podSpec:
containers:
- name: kiam
image: kuberhealthy/kiam-check:v1.3.0
image: kuberhealthy/kiam-check:v1.3.1
imagePullPolicy: IfNotPresent
env:
- name: AWS_REGION
Expand Down
1 change: 1 addition & 0 deletions cmd/kuberhealthy/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
kuberhealthy
build.sh
2 changes: 1 addition & 1 deletion cmd/kuberhealthy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.2 as builder
FROM golang:1.21.5 as builder
LABEL LOCATION="git@github.com:kuberhealthy/kuberhealthy.git"
LABEL DESCRIPTION="Kuberhealthy - Check and expose kubernetes cluster health in detail."
COPY . /build
Expand Down
10 changes: 6 additions & 4 deletions cmd/kuberhealthy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ TAG := "unstable"

.PHONY: build build-dev push test run run-influx

build:
docker buildx build --platform=linux/amd64 --no-cache --pull -t ${IMAGE}:${TAG} -f Dockerfile ../../
build-dev:
docker buildx build --platform=linux/amd64 -t ${IMAGE}:${TAG} -f Dockerfile ../../
docker build -t ${IMAGE}:${TAG} -f Dockerfile ../../
build:
docker buildx build --platform linux/amd64,linux/arm64 --push -t ${IMAGE}:${TAG} -f Dockerfile ../../
push:
docker push ${IMAGE}:${TAG}
test:
POD_NAME="kuberhealthy-test" go test -run TestWebServer -v -args -- --debug --forceMaster
run:
go build
POD_NAME="kuberhealthy-test" ./kuberhealthy --debug --forceMaster
KH_EXTERNAL_REPORTING_URL=localhost:8006 POD_NAMESPACE=kuberhealthy POD_NAME="kuberhealthy-test" ./kuberhealthy --debug --forceMaster --config ./test/test-config.yaml
run-influx:
go build
POD_NAME="kuberhealthy-test" ./kuberhealthy -debug -forceMaster -enableInflux -influxUrl=http://localhost:8086 -influxDB=kuberhealthy
Loading

0 comments on commit 6c9dac2

Please sign in to comment.