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

feat: add cert-manager logic #528

Merged
merged 9 commits into from
Jan 13, 2023
Merged

Conversation

RealAnna
Copy link
Contributor

@RealAnna RealAnna commented Dec 15, 2022

This pr adds logic to generate certificate fo the lifecycle toolkit operator, the whiring and changes to the operator will be in a follow up pr.

main controller logic:

  • whenever the toolkit operator deployment changes, check for the needed webhooks secrets. (For now only mutating webhook) If the secret is expired or does not exist create one.

the whole kubeobject folder uses code from dynatrace/operator

the code in keptnwebhookcontroller is an adaptation of dynatrace/operator/certcontroller

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #528 (bfa9c50) into main (36a6169) will increase coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   49.83%   49.87%   +0.03%     
==========================================
  Files          60       60              
  Lines        5528     5528              
==========================================
+ Hits         2755     2757       +2     
+ Misses       2664     2663       -1     
+ Partials      109      108       -1     
Impacted Files Coverage Δ
...lers/lifecycle/keptnworkloadinstance/controller.go 77.04% <0.00%> (-0.52%) ⬇️
...ptnworkloadinstance/reconcile_prepostevaluation.go 90.90% <0.00%> (+9.09%) ⬆️
Flag Coverage Δ
component-tests 50.82% <ø> (-0.08%) ⬇️
keptn-lifecycle-operator 47.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@mowies mowies changed the base branch from main to feat/introduce_certmanager_operator December 15, 2022 13:07
@RealAnna RealAnna force-pushed the feat/introduce_certmanager_operator branch from c7a0e9c to 2dae13f Compare December 15, 2022 13:57
@RealAnna RealAnna force-pushed the feat/certmanager_operator_logic branch from 3f9a0a2 to e355d36 Compare December 15, 2022 14:17
cert-manager/.dockerignore Outdated Show resolved Hide resolved
cert-manager/Dockerfile Outdated Show resolved Hide resolved
cert-manager/hack/boilerplate.go.txt Outdated Show resolved Hide resolved
cert-manager/kubeobjects/certificates.go Outdated Show resolved Hide resolved
cert-manager/kubeobjects/certificates.go Outdated Show resolved Hide resolved
cert-manager/controllers/keptnwebhookcontroller/certs.go Outdated Show resolved Hide resolved
@RealAnna RealAnna force-pushed the feat/certmanager_operator_logic branch from e355d36 to d9fccd3 Compare December 16, 2022 08:04
klc-cert-manager/Dockerfile Outdated Show resolved Hide resolved
klc-cert-manager/Dockerfile Outdated Show resolved Hide resolved
klc-cert-manager/Dockerfile Outdated Show resolved Hide resolved
klc-cert-manager/Makefile Outdated Show resolved Hide resolved
klc-cert-manager/config/rendered/release.yaml Outdated Show resolved Hide resolved
operator/config/crd/patches/webhook_in_keptnapps.yaml Outdated Show resolved Hide resolved
@RealAnna RealAnna force-pushed the feat/certmanager_operator_logic branch from 7d43bab to f5c4e99 Compare December 20, 2022 09:29
@RealAnna RealAnna force-pushed the feat/introduce_certmanager_operator branch from 736688e to 20fb545 Compare December 20, 2022 10:13
klt-cert-manager/Makefile Outdated Show resolved Hide resolved
klt-cert-manager/PROJECT Outdated Show resolved Hide resolved
klt-cert-manager/Makefile Outdated Show resolved Hide resolved
Base automatically changed from feat/introduce_certmanager_operator to main January 9, 2023 14:12
@RealAnna RealAnna force-pushed the feat/certmanager_operator_logic branch 2 times, most recently from 705663c to 4292f3a Compare January 10, 2023 09:02
RealAnna and others added 8 commits January 10, 2023 10:03
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added base for cert-manager

Signed-off-by: RealAnna <anna.reale@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

rename

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

rename

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: peer review

Signed-off-by: RealAnna <anna.reale@dynatrace.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

Update klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go

Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

Update klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go

Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

Update klt-cert-manager/controllers/keptnwebhookcontroller/keptnwebhookcertificate_controller.go

Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

rename

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added logic for cert handling

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

removed old label

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

fix according to reviews

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

fix according to reviews

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: fix certmanager logic

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added secrets for conv webhook

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: tests

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: cleaned up

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added crds config

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: peer review, renamed things

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added logic for cert handling

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: removedatogenerated  TODO

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

feat: added logic for cert handling

Signed-off-by: RealAnna <anna.reale@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

addressed reviews

Signed-off-by: RealAnna <anna.reale@dynatrace.com>
Signed-off-by: Thomas Schuetz <thomas.schuetz@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

added to CI build

Signed-off-by: RealAnna <anna.reale@dynatrace.com>

added to CI build

Signed-off-by: RealAnna <anna.reale@dynatrace.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>

review

Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

review

Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>

review

Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
Signed-off-by: RealAnna <anna.reale@dynatrace.com>
@RealAnna RealAnna force-pushed the feat/certmanager_operator_logic branch from 4292f3a to 16e4b47 Compare January 10, 2023 09:05
Signed-off-by: RealAnna <anna.reale@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented Jan 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@bacherfl bacherfl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@RealAnna RealAnna merged commit c0ece7a into main Jan 13, 2023
@RealAnna RealAnna deleted the feat/certmanager_operator_logic branch January 13, 2023 09:18
@keptn-bot keptn-bot mentioned this pull request Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants