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

feat: conditionally enable k8s logs requirements #16

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

matt-march
Copy link
Contributor

Adds the ability to conditionally enable some role and volume access settings to enable k8s logs as a source

ref: LOG-18839

@matt-march matt-march force-pushed the mattmarch/LOG-18839 branch 3 times, most recently from 5ccf8c1 to 711f44e Compare February 2, 2024 22:03
@@ -80,10 +99,18 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: "/vector-data-dir"
mountPath: "/data/vector"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good call making this match the default.

@@ -40,5 +40,7 @@ helm install edge mezmo/edge \
| service.sourcePorts.start | int | 8000 | The start of the port range (inclusive [start, end])
| service.sourcePorts.end | int | 8010 | The end of the port range (set 0 or "" to disable port range)
| service.sourcePorts.list | array[] | [] | Optional list of discrete ports to configure on the service
| enableK8sLogs | boolean | false | Whether or not to add ClusterRole and Volume access required for k8s logs source
| pvcClaimName | string | "" | Optional name for an existing PersistentStorageClaim to use for default storage
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think "pvcClaim" is redundant on the 'c'.
The description I think should say PersistentVolumeClaim.
Might want to mention what this storage is used for (disk buffer, aggregate persistence). (?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Might want to mention here or in comments that leaving unspecified uses ephemeral storage. (?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, thanks. Fixed the name and added more to the comments

@@ -71,6 +84,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.labels['apps.kubernetes.io/pod-index']
{{- if .Values.enableK8sLogs }}
- name: EDGE_SELF_NODE_NAME
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we stick with MEZMO_ prefix for these vars, or is there a reason to specify EDGE_ here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The var refers to the node that the running instance is on, which is why I was thinking EDGE_ since that's the name of the executing thing. I can update for consistency though if you think that's better

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't feel too strongly about it. Just noticed it was the first var where we departed on the brand name. 🤷

valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- end }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Re: disk buffer. I was also thinking about adding control values for Buffer sizes:
https://github.com/answerbook/pipeline-service/blob/feature/edge-disk-buffer-2/lib/pipeline/base.js#L619-L631

We could include with PV changes, or just bring those in separately. Or if you don't want to deal with other nit picking I can bring PV in with those after the feature is formally in service main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add them in. Is it MEZMO_DISK_BUFFER_MAX_BYTES and MEZMO_MEM_BUFFER_MAX_EVENTS or are there others too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks. Those are the only two coming so far.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added config options for those two

Adds the ability to conditionally enable some role and volume access
settings to enable k8s logs as a source
Also adds the ability to supply a PersistentVolumeClaim name

ref: LOG-18839
Copy link
Collaborator

@aholmberg aholmberg left a comment

Choose a reason for hiding this comment

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

lgtm!

@matt-march matt-march merged commit d65db5c into main Feb 7, 2024
1 check passed
@matt-march matt-march deleted the mattmarch/LOG-18839 branch February 7, 2024 20:20
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