Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Flush EC2 service cache on new rollup #316

Closed
wants to merge 74 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6ce7953
Delete README.md
Jan 12, 2021
3ad13b8
delete all
Jan 12, 2021
2816490
scaffolding
Jan 12, 2021
87afbd6
add API
Jan 12, 2021
25644a6
initial code
Jan 12, 2021
8f33f1e
add more scaffolding
Jan 12, 2021
41bd571
Add kubernetes API calls
Jan 13, 2021
335fb4f
aws API calls
Jan 13, 2021
6b8dad5
AWS API calls & Drift detection
Jan 13, 2021
5cb9efb
initial rotation logic
Jan 14, 2021
59e9b0d
Implemented RollingUpgrade object validation. (#176)
shreyas-badiger Jan 14, 2021
7cb15b0
Fix all the "make vet" errors in Controller V2 branch. (#177)
shreyas-badiger Jan 28, 2021
2c1d8e7
Controller v2: Implementation of Instance termination (#178)
shreyas-badiger Feb 3, 2021
dd6a332
Migrate Script Runner (#179)
eytan-avisror Feb 10, 2021
57df5a5
Implemented node drain. (#181)
shreyas-badiger Feb 12, 2021
11d3ae6
Eager mode implementation (#183)
shreyas-badiger Feb 18, 2021
14e950e
Metrics features (#189)
shaoxt Mar 2, 2021
728dae9
Process the batch rotation in parallel (#192)
shreyas-badiger Mar 11, 2021
668c5d8
Move the DrainManager within ReplaceBatch(), to access one per Rollin…
shreyas-badiger Mar 18, 2021
71b310a
Refine metrics implementation to support goroutines (#196)
shaoxt Mar 26, 2021
77f985c
Ignore generated code (#201)
shaoxt Mar 30, 2021
665c64b
Fix bug in deleting the entry in syncMap (#203)
shreyas-badiger Mar 30, 2021
d5935e3
Unit tests for controller-v2 (#215)
shreyas-badiger Apr 19, 2021
1f0f075
#2285: rollup CR statistic metrics in v2 (#218)
sahilbadla Apr 21, 2021
c445af9
#2285: renamed some methods related to metrics (#224)
sahilbadla Apr 29, 2021
b8d0e72
#2286: removed version from metric namespace (#227)
sahilbadla May 3, 2021
b664fdd
Create RollingUpgradeContext (#234)
shreyas-badiger May 13, 2021
b659e0f
Resolve compile errors caused by merge conflict. (#235)
shreyas-badiger May 13, 2021
a490333
upgrade-manager-v2: Move DrainManager back to Reconciler (#236)
shreyas-badiger May 18, 2021
6fef5fd
V2 controller metrics concurrency fix (#231)
shaoxt May 18, 2021
a9ac50f
add missing parenthesis (#239)
shreyas-badiger May 18, 2021
1fc5847
metricsMutex should be initialized (#240)
shaoxt May 18, 2021
18e0e75
upgrade-manager-v2: Load test fixes (#245)
shreyas-badiger Jun 2, 2021
066731d
final push before RC release. (#254)
shreyas-badiger Jun 16, 2021
f5dd1cb
Fix metrics collecting issue (#249)
shaoxt Jun 16, 2021
376657f
Revert "Fix metrics collecting issue (#249)" (#256)
shreyas-badiger Jun 16, 2021
3eafd00
Fix metrics calculation issue (#258)
shaoxt Jun 16, 2021
79db022
Add a mock for test and update version in Makefile (#262)
shreyas-badiger Jun 22, 2021
2390ea0
and CR end time (#264)
shreyas-badiger Jun 23, 2021
a4e0e84
upgrade-manager-v2: expose totalProcessing time and other metrics (#265)
shreyas-badiger Jun 23, 2021
610f454
upgrade-manager-v2: remove function duplicate declaration. (#266)
shreyas-badiger Jun 24, 2021
b15838e
Carry the metrics status in RollingUpgrade CR (#267)
shaoxt Jun 24, 2021
c0a163b
move cloud discovery after nodeInterval / drainInterval wait (#270)
shreyas-badiger Jun 29, 2021
b2b39a0
upgrade-manager-v2: Add nodeEvents handler instead of a watch handler…
shreyas-badiger Jul 12, 2021
0e64929
upgrade-manager-v2: Process next batch while waiting on nodeInterval …
shreyas-badiger Jul 20, 2021
00f7e89
upgrade-manager-v2: Fix unit tests (#275)
shreyas-badiger Jul 21, 2021
7a4766d
upgrade-manager-v2: Add CI github action, fix lint errors. (#276)
shreyas-badiger Jul 21, 2021
164725f
Release v1.0.0 (#277)
shreyas-badiger Jul 22, 2021
5bdc134
Controller v2 bdd changes (#278)
sahilbadla Jul 30, 2021
42abe52
Controller v2 (#279)
sahilbadla Jul 30, 2021
62c2255
Controller v2 (#280)
sahilbadla Jul 30, 2021
1be8190
Controller v2 (#282)
sahilbadla Jul 30, 2021
93626b4
Controller v2 (#283)
sahilbadla Jul 30, 2021
3841cc7
#2122: bdd changes for v2 (#284)
sahilbadla Jul 30, 2021
998de0d
V2 bdd (#285)
sahilbadla Aug 2, 2021
835fd0d
V2 bdd (#286)
sahilbadla Aug 3, 2021
2d8651c
Controller v2 (#288)
sahilbadla Aug 3, 2021
86412d5
Controller v2 (#289)
sahilbadla Aug 3, 2021
b698dd6
Controller v2 (#290)
sahilbadla Aug 3, 2021
db54e0b
Controller v2 (#291)
sahilbadla Aug 3, 2021
c35445d
Controller v2 (#292)
sahilbadla Aug 4, 2021
52d80d9
check for ASG's launch template version instead latest. (#293)
shreyas-badiger Aug 5, 2021
0b22e3a
controller v2: Fix ci job (#295)
shreyas-badiger Aug 5, 2021
3427b37
Release v1.0.1 (#294)
shreyas-badiger Aug 5, 2021
95afa1b
replace launchTemplate latest string with version number (#296)
shreyas-badiger Aug 6, 2021
15007b3
Release v1.0.2 (#297)
shreyas-badiger Aug 6, 2021
1e6d29d
Add ignoreDrainFailure and DrainTimeout as controller arguements (#300)
shreyas-badiger Aug 17, 2021
e77431c
fix: fix panic when using MixedInstancesPolicy (#298)
backjo Aug 23, 2021
df08ab0
Set Instances to StandBy in batches (#303)
shreyas-badiger Aug 26, 2021
6252725
revert #300 (#305)
shreyas-badiger Sep 3, 2021
4d1afe8
Release v1.0.3 (#306)
shreyas-badiger Sep 3, 2021
995b81b
controller flags for ignoreDrainFailures and drainTimeout (#307)
shreyas-badiger Oct 1, 2021
c593b01
Release v1.0.4 (#308)
shreyas-badiger Oct 4, 2021
61f4602
Update rollingupgrade_controller.go
Feb 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,85 @@
# Change Log
All notable changes to this project will be documented in this file.

## [v1.0.4] - 2021-10-04
995b81b controller flags for ignoreDrainFailures and drainTimeout (#307)


## [v1.0.3] - 2021-09-03
6252725 revert #300 (#305)
df08ab0 Set Instances to StandBy in batches (#303)
e77431c fix: fix panic when using MixedInstancesPolicy (#298)
1e6d29d Add ignoreDrainFailure and DrainTimeout as controller arguements (#300)


## [v1.0.2] - 2021-08-05
d73da1b replace launchTemplate latest string with version number (#296)

## [v1.0.1] - 2021-08-05
52d80d9 check for ASG's launch template version instead latest. (#293)
c35445d Controller v2: fix BDD template and update Dockerfile with bash (#292)
db54e0b Controller v2: fix BDD template (#291)
b698dd6 Controller v2: remove cleaning up ruObject as BDD already does. (#290)
86412d5 Controller v2: increase memory/CPU limit and update args (#289)
2d8651c Controller v2: update args (#288)
835fd0d V2 bdd (#286)
998de0d V2 bdd (#285)
3841cc7 #2122: bdd changes for v2 (#284)
93626b4 Controller v2: BDD cron update (#283)
1be8190 Controller v2: BDD cron update (#282)
62c2255 Controller v2: BDD cron update (#280)
42abe52 Controller v2: BDD cron update (#279)
5bdc134 Controller v2 bdd changes (#278)

## [v1.0.0] - 2021-07-21
7a4766d (HEAD -> controller-v2, origin/controller-v2) upgrade-manager-v2: Add CI github action, fix lint errors. (#276)
00f7e89 upgrade-manager-v2: Fix unit tests (#275)
0e64929 upgrade-manager-v2: Process next batch while waiting on nodeInterval period. (#273)
b2b39a0 upgrade-manager-v2: Add nodeEvents handler instead of a watch handler (#272)
c0a163b move cloud discovery after nodeInterval / drainInterval wait (#270)
b15838e Carry the metrics status in RollingUpgrade CR (#267)
610f454 upgrade-manager-v2: remove function duplicate declaration. (#266)
a4e0e84 upgrade-manager-v2: expose totalProcessing time and other metrics (#265)
2390ea0 and CR end time (#264)
79db022 (tag: v1.0.0-RC1) Add a mock for test and update version in Makefile (#262)
3eafd00 Fix metrics calculation issue (#258)
376657f Revert "Fix metrics collecting issue (#249)" (#256)
f5dd1cb Fix metrics collecting issue (#249)
066731d final push before RC release. (#254)
18e0e75 upgrade-manager-v2: Load test fixes (#245)
1fc5847 metricsMutex should be initialized (#240)
a9ac50f add missing parenthesis (#239)
6fef5fd V2 controller metrics concurrency fix (#231)
a490333 upgrade-manager-v2: Move DrainManager back to Reconciler (#236)
b659e0f Resolve compile errors caused by merge conflict. (#235)
b664fdd Create RollingUpgradeContext (#234)
b8d0e72 #2286: removed version from metric namespace (#227)
c445af9 #2285: renamed some methods related to metrics (#224)
1f0f075 #2285: rollup CR statistic metrics in v2 (#218)
d5935e3 Unit tests for controller-v2 (#215)
665c64b Fix bug in deleting the entry in syncMap (#203)
77f985c Ignore generated code (#201)
71b310a Refine metrics implementation to support goroutines (#196)
668c5d8 Move the DrainManager within ReplaceBatch(), to access one per RollingUpgrade CR (#195)
728dae9 Process the batch rotation in parallel (#192)
14e950e Metrics features (#189)
11d3ae6 Eager mode implementation (#183)
57df5a5 Implemented node drain. (#181)
dd6a332 Migrate Script Runner (#179)
2c1d8e7 Controller v2: Implementation of Instance termination (#178)
7cb15b0 Fix all the "make vet" errors in Controller V2 branch. (#177)
59e9b0d Implemented RollingUpgrade object validation. (#176)
5cb9efb initial rotation logic
6b8dad5 AWS API calls & Drift detection
335fb4f aws API calls
41bd571 Add kubernetes API calls
8f33f1e add more scaffolding
25644a6 initial code
87afbd6 add API
2816490 scaffolding
3ad13b8 delete all
6ce7953 Delete README.md

## [v0.17] - 2020-12-11

* aa2b73b - use NamespacedName (#160)
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/bdd.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: BDD

on:
schedule:
- cron: '0 7 * * *' # UTC is being used, 07:00 am would be 12:00am in PT
push:
branches:
- controller-v2

jobs:
build:
Expand Down Expand Up @@ -41,4 +42,5 @@ jobs:
$HOME/go/bin/godog

- name: Cleanup
run: kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system
run: |
kubectl delete deployment upgrade-manager-controller-manager -n upgrade-manager-system
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name: Build-Test
on:
push:
branches:
- master
- controller-v2
pull_request:
branches:
- master
- controller-v2
release:
types:
- published

jobs:
build:
name: CI # Lint, Test, Codecov, Docker build & Push
if: github.repository == 'keikoproj/upgrade-manager'
runs-on: ubuntu-latest
steps:

Expand All @@ -39,7 +40,6 @@ jobs:
mv kubebuilder_${version}_linux_${arch} kubebuilder && sudo mv kubebuilder /usr/local/
# update your PATH to include /usr/local/kubebuilder/bin
export PATH=$PATH:/usr/local/kubebuilder/bin

- name: Run Tests
run: make test

Expand All @@ -55,14 +55,14 @@ jobs:
if: github.event_name == 'pull_request' || (github.repository != 'keikoproj/upgrade-manager' && github.event_name == 'push')
run: make docker-build

- name: Build and push Docker image with tag master # only on pushes to keikoproj/upgrade-manager
- name: Build and push Docker image with tag controller-v2 # only on pushes to keikoproj/upgrade-manager
if: github.event_name == 'push' && github.repository == 'keikoproj/upgrade-manager'
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: keikoproj/rolling-upgrade-controller
tags: master
tags: controller-v2

- name: Build and push Docker image with tag latest # only on releases of keikoproj/upgrade-manager
if: github.event_name == 'release' && github.repository == 'keikoproj/upgrade-manager'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bin
# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*
!api/**/zz_generated.*

# editor and IDE paraphernalia
.idea
Expand All @@ -26,4 +27,4 @@ vendor/
config/default/manager_image_patch.yaml-e
.vscode/
cover.html
.DS_Store
.DS_Store
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Build the manager binary
FROM golang:1.15.6 as builder
FROM golang:1.15 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
COPY pkg pkg
RUN go mod download

# Copy the go source
Expand All @@ -18,19 +17,15 @@ COPY controllers/ controllers/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go

# Add kubectl
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v1.14.10/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
RUN chmod +x /usr/local/bin/kubectl

# Add busybox
FROM busybox:1.32.0 as shelladder
FROM busybox:1.32.1 as shelladder

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:latest
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

COPY --from=shelladder /bin/sh /bin/sh
COPY --from=builder /workspace/manager .
COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/kubectl
ENTRYPOINT ["/manager"]
Loading