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

chore: add experimental modules #3480

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Conversation

kolesnikovae
Copy link
Collaborator

No description provided.

@kolesnikovae kolesnikovae marked this pull request as ready for review August 13, 2024 12:34
@kolesnikovae kolesnikovae requested a review from a team as a code owner August 13, 2024 12:34
Comment on lines 84 to 90
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE_FQDN
value: "{{ .Release.Namespace }}.svc{{ .Values.pyroscope.cluster_domain }}"
Copy link
Collaborator Author

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

Comment on lines +55 to +66
// 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...)
Copy link
Collaborator Author

@kolesnikovae kolesnikovae Aug 13, 2024

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

Comment on lines +29 to +38
# 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
Copy link
Collaborator Author

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

Comment on lines +5 to +11
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"
Copy link
Collaborator Author

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

Comment on lines +60 to +68
compaction-worker:
kind: StatefulSet
replicaCount: 3
persistence:
enabled: false
extraVolumeMounts:
- name: data
mountPath: /data-compaction-worker
subPath: compaction-worker
Copy link
Collaborator Author

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") != ""
Copy link
Collaborator Author

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

@kolesnikovae kolesnikovae merged commit 04923f5 into main Aug 14, 2024
18 checks passed
@kolesnikovae kolesnikovae deleted the chore/add-experimenatl-modules branch August 14, 2024 09:17
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.

2 participants