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

Charts improvements and bug fixes #164

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

iosdev747
Copy link
Collaborator

PR changes:

  • NPE fixes
  • added JVM remote debug flags
  • wget cert validation under flag for VPN issues (blocked in internal N/W)
  • added values file for local setup

TODO:

  • cleanup
  • readme update
  • remote args under flag

README.md Outdated
@@ -62,6 +62,11 @@ OR

Start [varadhi local \[run\]](.run%2Fvaradhi%20local%20%5Brun%5D.run.xml) IntelliJ run profile.

## k8s Deployment

```helm install varadhi setup/helm/varadhi -f setup/helm/varadhi/fcp.values.yaml```
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is server ? Should we call it indicate that ?.

setup/docker/Dockerfile Show resolved Hide resolved
@@ -66,5 +75,7 @@ RUN sed -i 's|src/main/resources/|/etc/varadhi/|' /etc/varadhi/configuration.yml
USER varadhi
WORKDIR /usr/share/varadhi

RUN env
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is for debug purposes ? If yes, should it be at the beginning after env block ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed it, accidentally added it

@@ -15,5 +15,8 @@ JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9990"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dlog4j2.configurationFile=/etc/varadhi/log4j2.xml"
if "$APP_DEBUG"; then
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
Copy link
Collaborator

Choose a reason for hiding this comment

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

let port be configurable with default ?
Also thinking if we should follow a convention, current environment variables don't. Something like [] ?

@@ -0,0 +1,25 @@
apiVersion: v1
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this intended ? There is already service-service.yaml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, I left it here for my reference. Will remove it.

@@ -65,4 +65,9 @@ featureFlags:

{{ template "configMap.metastore.zookeeper" . }}

{{ with .Values.varadhi.app.controller }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be we shouldn't call this file as server anymore as it will be common for all roles ?

@@ -12,6 +12,6 @@ metadata:
component: {{ .Values.deployment.name }}
data:
configuration.yml: |
{{- if eq .Values.deployment.name "server" }}
{{- if or (eq .Values.deployment.name "server") (eq .Values.deployment.name "controller") (eq .Values.deployment.name "consumer") }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above, i think we can keep it as global app config and avoid component specific conditions ?

@@ -57,6 +57,13 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.deployment.resources | nindent 12 }}
ports:
- containerPort: 9990 # jmx remote port
Copy link
Collaborator

Choose a reason for hiding this comment

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

configurable port numbers ?

@@ -212,12 +219,12 @@ messaging:
configMapName: messaging
pulsar:
adminOptions:
serviceHttpUrl: "http://192.168.1.3:8080"
serviceHttpUrl: "http://host.docker.internal:8080"
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be time to decide the hierarchy of values files. Suggestion/TBD : values -> fcp.values -> role specific i.e (controller|consumer|server|standalone) and override only required content in higher level files ?

@@ -16,4 +16,11 @@ JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dlog4j2.configurationFile=/etc/varadhi/log4j2.xml"

# If debug flag is set(1 or true) then enable remote debugging
if [[ ! -z "$APP_DEBUG" ]]; then
if [[ "$APP_DEBUG" == "1" || "$APP_DEBUG" == "true" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

any issue being it just set to any value ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, idea was if someone sets to false or 0 or any other invalid value, we don't enable it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why two levels of if block needed, only inner block should suffice ?

@@ -9,4 +9,6 @@ public class MemberConfig {
private int clusterPort;
private int maxQps;
private int networkMBps;
private int cpuCount;
private int nicMBps;
}
Copy link
Collaborator

@kmrdhruv kmrdhruv Sep 17, 2024

Choose a reason for hiding this comment

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

instead we can adjust the .values file to have new config.

@@ -16,4 +16,11 @@ JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dlog4j2.configurationFile=/etc/varadhi/log4j2.xml"

# If debug flag is set(1 or true) then enable remote debugging
if [[ ! -z "$APP_DEBUG" ]]; then
if [[ "$APP_DEBUG" == "1" || "$APP_DEBUG" == "true" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why two levels of if block needed, only inner block should suffice ?

connectionTimeoutMs: 2000
readTimeoutMs: 2000
requestTimeoutMs: 2000
clientOptions:
serviceUrl: "http://192.168.1.3:8080"
serviceUrl: "http://host.docker.internal:8080"
Copy link
Collaborator

Choose a reason for hiding this comment

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

create standalone values file to override this, as value is specific to the standalone setup.

@@ -0,0 +1,240 @@
# Default values for varadhi.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is duplicating the entire values files for each component, that shouldn't be needed. What is the proposed hierarchy ?

@anuj-flipkart anuj-flipkart linked an issue Oct 24, 2024 that may be closed by this pull request
3 tasks
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.

Charts improvements and bug fixes
2 participants