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

distributed: major refactoring, use common templates #1520

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Sep 20, 2024

  • added default common.<component>.spec, which is merged with all *.<component>.spec, e.g: common.vmagent.spec is merged with availabilityZones[1].vmagent.spec
  • vmauthIngestGlobal was changed to write.global.vmauth
  • vmauthQueryGlobal was changed to read.global.vmauth
  • availabilityZones[*].allowIngest was changed to availabilityZones[*].write.allow
  • availabilityZones[*].allowRead was changed to availabilityZones[*].read.allow
  • availabilityZones[*].nodeSelector was moved to availabilityZones[*].common.spec.nodeSelector
  • availabilityZones[*].extraAffinity was moved to availabilityZones[*].common.spec.affinity
  • availabilityZones[*].topologySpreadConstraints was moved to availabilityZones[*].common.spec.topologySpreadConstraints
  • availabilityZones[*].vmauthIngest was moved to availabilityZones[*].write.vmauth
  • availabilityZones[*].vmauthQueryPerZone was moved to availabilityZones[*].read.perZone.vmauth
  • availabilityZones[*].vmauthCrossAZQuery was moved to availabilityZones[*].read.crossZone.vmauth

Comment on lines +3 to +4
- `vmauthIngestGlobal` was changed to `write.global.vmauth`
- `vmauthQueryGlobal` was changed to `read.global.vmauth`
Copy link
Contributor

Choose a reason for hiding this comment

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

How about moving them into .global as global.vmauthIngest and global.vmauthQuery?
Since there shouldn't be other fields under write.global or global.write.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

global section in helm is special one, it's shared across all charts in release

-
# -- Availability zone name
name: zone-eu-1
common:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think components shouldn't share other spec except nodeSelector/affinitytopologySpreadConstraints, which could lead to misuse and it's better to not lead to that way.
How about changing this as a plain commonSpec instead of having common.spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

common.spec allows having then common.annotations and common.labels

# Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmagentspec)
spec:
remoteWriteSettings:
useMultiTenantMode: true
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to not set useMultiTenantMode=true by default, since it degrades vmagent performance.

Copy link
Contributor Author

@AndrewChubatiuk AndrewChubatiuk Sep 24, 2024

Choose a reason for hiding this comment

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

updated this

vminsert:
serviceSpec:
spec:
clusterIP: None
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for this setting?

Copy link
Contributor Author

@AndrewChubatiuk AndrewChubatiuk Sep 24, 2024

Choose a reason for hiding this comment

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

It was hardcoded in templates, looks like it's needed to provide to vmauth pod ips and move balancing to vmauth

whenUnsatisfiable: ScheduleAnyway
write:
# -- Allow data ingestion to this zone
allow: true
Copy link
Contributor

Choose a reason for hiding this comment

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

How about unifying them to enable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

enable is for resource creation and allow is for traffic routing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants