Skip to content

Conversation

@MakarkinSAkvelon
Copy link
Contributor

@MakarkinSAkvelon MakarkinSAkvelon commented Nov 17, 2022

solves #24310
Add Healthcheck and Autoscaling in Kubernetes deployments


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

@MakarkinSAkvelon
Copy link
Contributor Author

R: @olehborysevych

@MakarkinSAkvelon
Copy link
Contributor Author

R: @rshamunov

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

1 similar comment
@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@rshamunov rshamunov self-requested a review November 18, 2022 09:04
Copy link
Contributor

@rshamunov rshamunov left a comment

Choose a reason for hiding this comment

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

LGTM

@rshamunov rshamunov self-requested a review November 22, 2022 13:19
@olehborysevych
Copy link
Contributor

LGTM

@MakarkinSAkvelon MakarkinSAkvelon marked this pull request as ready for review November 29, 2022 16:17
@MakarkinSAkvelon
Copy link
Contributor Author

R: @damondouglas

Copy link
Contributor

@damondouglas damondouglas left a comment

Choose a reason for hiding this comment

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

name: playground-java
spec:
maxReplicas: 10
minReplicas: 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this one configured with 2 while the others 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We tested Java backend. For normal autoscaling at least +1 pod required

Comment on lines 36 to 46
- containerPort: 8080
livenessProbe:
httpGet:
path: /liveness
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for the 8080 to be acquired from a helm variable to populate ports.containerPort, livenessProbe.httpGet.port, and readinessProbe.httpGet.port?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines +51 to +55
memory: "50Mi"
cpu: "250m"
limits:
cpu: "500"
memory: "500Mi"
Copy link
Contributor

Choose a reason for hiding this comment

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

How was the values 50Mi, 250m, 500, and 500Mi determined? I wouldn't know myself and not a blocker for this PR. I was just curious and thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We did some tests thru the Apache JMeter. These resources are enough for simple tasks, and they will be autoscaled once loading will be increased

Comment on lines 47 to 53
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above, can we populate the port parameter from a helm variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines 46 to 52
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above, can we populate the port parameter from a helm variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines 46 to 52
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above, can we populate the port parameter from a helm variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines 48 to 54
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above, can we populate the port parameter from a helm variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines 45 to 51
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /readiness
port: 8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above, can we populate the port parameter from a helm variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Everything was moved to the values.yaml file

Comment on lines 33 to 39
static_ip: 34.120.95.76
redis_ip: 10.226.29.100:6379
project_id: astst-369706
registry: us-east1-docker.pkg.dev/astst-369706/playground-repository
static_ip_name: pg-static-ip
tag: teta
dns_name: dev-playground.online
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to hardcode these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those variables are changing automatically thru the Gradle task (if they exist) or will be created during execution. Removed for now

Copy link
Contributor

@damondouglas damondouglas left a comment

Choose a reason for hiding this comment

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

@pabloem LGTM

@pabloem
Copy link
Member

pabloem commented Dec 6, 2022

lgtm thanks!

@pabloem pabloem merged commit 60aba30 into apache:master Dec 6, 2022
lostluck pushed a commit to lostluck/beam that referenced this pull request Dec 22, 2022
* Healthcheck was added

* Autoscaling

* License information was added

* Move healthcheck vars to value.yaml

* remove unused values

* Resources limits were corrected

Co-authored-by: Sergey Makarkin <sergey.makarkin@akvelon.com>
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.

5 participants