Skip to content

[Feature Request] Add podDisruptionBudget in API server#2940

Merged
tmjd merged 4 commits into
tigera:masterfrom
MuhtasimTanmoy:add-calico-apiserver-pod-disruption-budget
Apr 1, 2024
Merged

[Feature Request] Add podDisruptionBudget in API server#2940
tmjd merged 4 commits into
tigera:masterfrom
MuhtasimTanmoy:add-calico-apiserver-pod-disruption-budget

Conversation

@MuhtasimTanmoy

@MuhtasimTanmoy MuhtasimTanmoy commented Oct 20, 2023

Copy link
Copy Markdown
Contributor

Description

Closes #2886

This PR adds podDisruptionBudget in the API Server and affects the calico-apiserver component.

Testing

For testing this feature :

  1. Install operator
  2. Run kubectl create -f ./config/samples/operator_v1_apiserver.yaml
  3. Run kubectl -n calico-system get pdb
  4. Shows podDisruptionBudget for calico-apiserver component.

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@CLAassistant

CLAassistant commented Oct 20, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@caseydavenport caseydavenport left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@MuhtasimTanmoy thanks for the PR! I've left a couple of small comments on it.

Comment thread pkg/common/common.go Outdated
Comment thread pkg/render/apiserver.go Outdated
@caseydavenport

Copy link
Copy Markdown
Member

/sem-approve

@caseydavenport

Copy link
Copy Markdown
Member

@MuhtasimTanmoy looks like make ut is failing because it's not expecting this new resource to exist.

Here's an example failure:

pkg/render Suite
Failure
/go/src/github.com/tigera/operator/pkg/render/apiserver_test.go:1653
Expected
    <int>: 16
to equal
    <int>: 15
/go/src/github.com/tigera/operator/pkg/render/apiserver_test.go:1568

You should be able to run these locally with make ut

@danudey danudey modified the milestones: v1.32.0, v1.32.1, v1.32.2 Dec 2, 2023
@danudey danudey modified the milestones: v1.32.2, v1.32.3 Dec 15, 2023
@danudey danudey modified the milestones: v1.32.3, v1.32.4 Jan 18, 2024
@radTuti radTuti modified the milestones: v1.32.4, v1.32.5, v1.32.6 Feb 16, 2024
@radTuti radTuti modified the milestones: v1.32.6, v1.32.7 Mar 25, 2024

@tmjd tmjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've pushed a commit to this branch, I found one bit I think needed changing (I've put a comment there) and I've fixed up the unit tests, they passed for me locally.

Comment thread pkg/render/apiserver.go
@tmjd

tmjd commented Apr 1, 2024

Copy link
Copy Markdown
Member

/sem-approve

@tmjd tmjd modified the milestones: v1.32.7, v1.35.0 Apr 1, 2024
@tmjd tmjd merged commit 174642f into tigera:master Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: calico-apiserver PodDisruptionBudget

7 participants