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

Add agent readreplica resources #2258

Merged
merged 60 commits into from
Dec 7, 2023
Merged

Conversation

ykadowak
Copy link
Contributor

@ykadowak ykadowak commented Dec 4, 2023

Description:

This PR adds k8s resources related to readreplica feature. Also added securityContext and refactor configmap of readreplica rotator.

Related Issue:

Versions:

  • Go Version: 1.21.4
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.28.4
  • NGT Version: 2.1.5

Checklist:

Special notes for your reviewer:

@github-actions github-actions bot removed the size/S label Dec 6, 2023
@ykadowak ykadowak changed the title [WIP] Feature/readreplica/deployments Add agent readreplica resources Dec 7, 2023
@ykadowak ykadowak requested review from a team, kmrmt and hlts2 and removed request for a team December 7, 2023 02:34
hlts2
hlts2 previously approved these changes Dec 7, 2023
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM!

kmrmt
kmrmt previously approved these changes Dec 7, 2023
@ykadowak ykadowak dismissed stale reviews from hlts2 and kmrmt via 8abde31 December 7, 2023 06:41
@hlts2 hlts2 self-requested a review December 7, 2023 06:49
@ykadowak ykadowak merged commit cc00b98 into main Dec 7, 2023
42 of 46 checks passed
@ykadowak ykadowak deleted the feature/readreplica/deployments branch December 7, 2023 07:15
kmrmt pushed a commit that referenced this pull request Dec 12, 2023
* Implement sample read replica rotation logic

* Add external-snapshotter in go.mod

* Add readreplica initial implementation

* Add service implementation of readreplica rotator

* Add readreplica rotate config

* Refactor to read labels

* replace id to _MY_TARGET_REPLICA_ID_

* Add snapshot k8s client

* Format

* Fix snapshot client initialization

* Add Apache License to main.go

* Use GetConfigOrDie

* Use internal/k8s client

* Refactor

* Use controller-runtime for CRUD in readreplica

* Remove snapshot client and use controller-runtime

* Move LabelSelector into internal/k8s

* Report error to span

* Update go modules

* Remove old example

* Refactor

* Disable exhaustruct for now

* Fix predeclared

* Fix stylecheck

* nolint:gomnd

* Add test template

* Add test for getNewBaseName

* Add readreplica-rotate build scripts

* Add service account and clusterroles for read replica rotator

* Update charts

* Update comment

* Add readreplica deployment templates

* Add readreplica deployment template

* Add svc for readreplica

* Update valdrelease

* Add podAntiAffinity for readreplica

* Add security context for readreplica

* Update valdrelease

* Update valdrelease scheme

* Fix component name of readreplica so that svc can find it well

* Change readreplica svc component name

* Change headless to normal ClusterIP to do loadbalancing for readreplica

* Fix comment

* Parametarize some field in configmap

* remove sidecar related things from readreplica deployment

* Fix readreplica svc type to ClusterIP

* Update README.md

* Add networkpolicy

* Update docs

* Update network policy selector label

* Apply format
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.

4 participants