-
Notifications
You must be signed in to change notification settings - Fork 626
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
chore: add experimental modules #3480
Conversation
abf8807
to
fedb62a
Compare
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: NAMESPACE_FQDN | ||
value: "{{ .Release.Namespace }}.svc{{ .Values.pyroscope.cluster_domain }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fond of doing this, but I couldn't find a simpler solution. I don't want to involve DNS here
// TODO: Implement k8s grpc resolver. | ||
// Note that this may require additional permissions. | ||
// Consider: https://github.com/sercand/kuberesolver | ||
// if os.Getenv("KUBERNETES_SERVICE_HOST") != "" { | ||
// builder, err := NewGrpcResolverBuilder(logger, address) | ||
// if err != nil { | ||
// return nil, fmt.Errorf("failed to create grpc resolver builder: %w", err) | ||
// } | ||
// options = append(options, grpc.WithResolvers(builder)) | ||
// return grpc.Dial(builder.resolverAddrStub(), options...) | ||
// } | ||
return grpc.Dial(address, options...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled it for now because of permission issues in the local deployment – nothing bad, just didn't have time to solve. Also, stumbled upon https://github.com/sercand/kuberesolver – looks pretty good
# deploy | ||
|
||
helm -n "$PYROSCOPE_TEST_NAMESPACE" upgrade --install \ | ||
--create-namespace pyroscope \ | ||
--values "$VALUES_FILE" \ | ||
--set pyroscope.image.repository="$IMAGE_NAME" \ | ||
--set pyroscope.image.tag="$IMAGE_TAG" \ | ||
"$HELM_CHART" | ||
|
||
kubectl --namespace "$PYROSCOPE_TEST_NAMESPACE" port-forward svc/pyroscope-query-frontend 4040:4040 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way I run it locally. The most important part is values-micro-services-experiment.yaml
I guess
query-backend.address: "dns:///_grpc._tcp.pyroscope-query-worker-headless.$(NAMESPACE_FQDN):9095" | ||
metastore.address: "dns:///_grpc._tcp.pyroscope-metastore-headless.$(NAMESPACE_FQDN):9095" | ||
metastore.raft.bind-address: ":9099" | ||
metastore.raft.server-id: "$(POD_NAME).pyroscope-metastore-headless.$(NAMESPACE_FQDN)" | ||
metastore.raft.advertise-address: "$(POD_NAME).pyroscope-metastore-headless.$(NAMESPACE_FQDN):9099" | ||
metastore.raft.bootstrap-peers: "dnssrvnoa+_raft._tcp.pyroscope-metastore-headless.$(NAMESPACE_FQDN):9099" | ||
metastore.raft.bootstrap-expect-peers: "3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why I added those env variables. Obviously, we can craft the addresses in the helm templates, but I decided not to modify them yet. I think that we may want to add component-specific templates instead of reusing the same one
compaction-worker: | ||
kind: StatefulSet | ||
replicaCount: 3 | ||
persistence: | ||
enabled: false | ||
extraVolumeMounts: | ||
- name: data | ||
mountPath: /data-compaction-worker | ||
subPath: compaction-worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that compaction-worker
is a statefulset: it will be using own persistent disks to avoid impacting the host
@@ -149,6 +166,14 @@ func (c *Config) RegisterFlagsWithContext(ctx context.Context, f *flag.FlagSet) | |||
c.LimitsConfig.RegisterFlags(f) | |||
c.Compactor.RegisterFlags(f, log.NewLogfmtLogger(os.Stderr)) | |||
c.API.RegisterFlags(f) | |||
|
|||
c.v2Experiment = os.Getenv("PYROSCOPE_V2_EXPERIMENT") != "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the environment variable that enables the new components
No description provided.