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

Additional Persistance Options #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WesselAtWork
Copy link

Wanted to add additional volumes so I could persist the mappings.
Found out that there is no way to do that sadly.

Values Keys

.Values.revisionHistoryLimit

Quality of life option for people using CD applications like Flux or Argo.

Defaults to 10 to keep default behaviour

.Values.persistence

The main bulk of this PR.
Split into mappings and responses

.Values.persistence.*.enabled

Default to false for backwards compatibility.

.Values.persistence.*.accessModes

Defaults to ["ReadWriteOnce"]

.Values.persistence.*.size

Defaults to 10Gi

.Values.persistence.*.storageClassName

The difference between storageClassName: "" and the storageClassName key being omitted are significant
I am using the same trick that grafana/helm-charts uses to allow a user omit the key, or set it to "".
Helm makes this hard as "" is falsy.
If you can think of a better trick, I am all ears.

By using the storageClassName of "-" in the values, it will template to "",
and not specifying the key will not include it in the resource

Defaults to being omitted as per recommendation

.Values.extraVolumes

Templates new Volumes onto the deployment resource.
Used to attach arbitrary extra volumes.

Defaults to empty

.Values.extraVolumeMounts

Templates extra Volume Mounts on the wiremock container, used in conjunction with the above

Defaults to empty

.Values.initContainer.extraVolumeMounts

Templates extra Volume Mounts on the wiremock Init Container, used in conjunction with the extraVolumes key.

Defaults to empty

.Values.extraObjects

Shamelessly borrowed from grafana/helm-charts

Very useful to deploy External Secrets resources or
to Network Resources like Istio / Traefik that need the port-numbers.

See the example for usage.

Defaults to empty

Notes

Playing around, with the default of ReadWriteOnce, I observed some rolling update issues with the volume being stuck to a specific pod.
The new pod can then never get the volume becuase it's currently attached to the old one.

Fix looks to be to change the deployment stratagy.
I want your input on this.

  strategy:
    type: Recreate

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

add extra volumes
add extra objects
add revisionHistoryLimit
@WesselAtWork WesselAtWork requested a review from gitkent as a code owner April 3, 2025 19:15
@WesselAtWork
Copy link
Author

@gitkent can you take a look at this?

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.

1 participant