Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/k8s.io/client-go-0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tekenstam authored Sep 13, 2023
2 parents 38d89fa + a7971bc commit 205811d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
push:
name: push
if: github.repository_owner == 'keikoproj'
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
unit-test:
if: github.repository_owner == 'keikoproj'
name: unit-test
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
Expand All @@ -33,6 +33,6 @@ jobs:
make test
- name: Upload to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
files: ./coverage.txt
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
Bleeding-edge development, not yet released

## [0.11.2] - 2023-04-05
## Updated
- feat: enable multi-architecture container image builds - #144

## [0.11.1] - 2023-03-06
## Fixed
- bugfix: Fixes timer replacement without clearing the old one present - #141

## [0.11.0] - 2022-12-07
## Updated
- Update workflow-controller and argoexec version to v3.4.4 - #132
Expand Down Expand Up @@ -86,7 +94,9 @@ Bleeding-edge development, not yet released
### Added
- Initial commit of project

[Unreleased]: https://github.com/keikoproj/active-monitor/compare/v0.11.0...HEAD
[Unreleased]: https://github.com/keikoproj/active-monitor/compare/v0.11.2...HEAD
[0.11.2]: https://github.com/keikoproj/active-monitor/compare/v0.11.1...v0.11.2
[0.11.1]: https://github.com/keikoproj/active-monitor/compare/v0.11.0...v0.11.1
[0.11.0]: https://github.com/keikoproj/active-monitor/compare/v0.10.0...v0.11.0
[0.10.0]: https://github.com/keikoproj/active-monitor/compare/v0.9.0...v0.10.0
[0.9.0]: https://github.com/keikoproj/active-monitor/compare/v0.8.0...v0.9.0
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Build the manager binary
FROM golang:1.18 as builder

ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand All @@ -17,7 +20,7 @@ COPY metrics/ metrics/
COPY store/ store/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o active-monitor-controller main.go
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o active-monitor-controller main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![PR](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)][GithubPrsUrl]
[![slack](https://img.shields.io/badge/slack-join%20the%20conversation-ff69b4.svg)][SlackUrl]

![version](https://img.shields.io/badge/version-0.11.0-blue.svg?cacheSeconds=2592000)
![version](https://img.shields.io/badge/version-0.11.2-blue.svg?cacheSeconds=2592000)
[![Build Status][BuildStatusImg]][BuildMasterUrl]
[![codecov][CodecovImg]][CodecovUrl]
[![Go Report Card][GoReportImg]][GoReportUrl]
Expand Down
5 changes: 4 additions & 1 deletion controllers/healthcheck_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ func (r *HealthCheckReconciler) watchWorkflowReschedule(ctx context.Context, req
// reschedule next run of workflow
helper := r.createSubmitWorkflowHelper(ctx, log, wfNamespace, hc)
r.TimerLock.Lock()
if t, ok := r.RepeatTimersByName[hc.GetName()]; ok {
log.Info("Stopping timer for previous workflow", "name", wfName, "stop status", t.Stop())
}
r.RepeatTimersByName[hc.GetName()] = time.AfterFunc(time.Duration(repeatAfterSec)*time.Second, helper)
r.TimerLock.Unlock()
log.Info("Rescheduled workflow for next run", "namespace", wfNamespace, "name", wfName)
Expand Down Expand Up @@ -1031,7 +1034,7 @@ func (r *HealthCheckReconciler) createServiceAccount(clientset kubernetes.Interf
return sa.Name, nil
}

//Delete a service Account
// Delete a service Account
func (r *HealthCheckReconciler) DeleteServiceAccount(clientset kubernetes.Interface, log logr.Logger, hc *activemonitorv1alpha1.HealthCheck, name string, namespace string) error {
sa, err := clientset.CoreV1().ServiceAccounts(namespace).Get(name, metav1.GetOptions{})
// If a service account already exists just re-use it
Expand Down
2 changes: 1 addition & 1 deletion controllers/healthcheck_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var _ = Describe("Active-Monitor Controller", func() {
return err
}

if instance.Status.StartedAt != nil {
if instance.Status.StartedAt != nil && instance.Status.SuccessCount+instance.Status.FailedCount >= 3 {
return nil
}
return fmt.Errorf("HealthCheck is not valid")
Expand Down

0 comments on commit 205811d

Please sign in to comment.