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

Do not merge - traefik persistent volume #4

Closed
wants to merge 12 commits into from

Conversation

kenafoster
Copy link

Reference Issues or PRs

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

volume {
name = "traefik-certs"
persistent_volume_claim {
claim_name = "persistent-volume-claim-2"
Copy link
Author

Choose a reason for hiding this comment

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

This should be referenced. If you create your PVC with https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/persistent_volume_claim then you can do something like kubernetes_persistent_volume_claim.[resource name].name

reclaim_policy = var.reclaim_policy
}

resource "kubernetes_manifest" "traefik-persistent-volume" {
Copy link
Author

Choose a reason for hiding this comment

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


}

resource "kubernetes_manifest" "persistent-volume-claim" {
Copy link
Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,13 @@
apiVersion: v1
Copy link
Author

Choose a reason for hiding this comment

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

this should not be committed

@@ -0,0 +1,13 @@
apiVersion: v1
Copy link
Author

Choose a reason for hiding this comment

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

this should not be committed




resource "kubernetes_persistent_volume_claim" "persistent-volume-claim" {
Copy link
Author

Choose a reason for hiding this comment

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

"persistent-volume-claim" - use _ and specify a bit more in the name, traefik_ingress_pvc should work

}
}

resource "kubernetes_persistent_volume" "traefik-persistent-volume" {
Copy link
Author

Choose a reason for hiding this comment

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

change to _


resource "kubernetes_persistent_volume_claim" "persistent-volume-claim" {
metadata {
name = "persistent-volume-claim"
Copy link
Author

Choose a reason for hiding this comment

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

Use name to ensure uniqueness

"${var.name}-traefik-ingress"

@kenafoster
Copy link
Author

Work was redone in a different PR, closing

@kenafoster kenafoster closed this May 2, 2024
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