Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from xoap-io/dev
Browse files Browse the repository at this point in the history
added right hpa config and added some exclusions for managed fields
  • Loading branch information
bbrauneck authored Jan 10, 2023
2 parents d8491af + 9afd021 commit e5f9e7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/megalinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0
- name: MegaLinter
id: ml
uses: megalinter/megalinter/flavors/terraform@v6.17.0
uses: megalinter/megalinter/flavors/terraform@v6.18.0
env:
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
15 changes: 13 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ resource "kubernetes_deployment" "this" {
lifecycle {
ignore_changes = [
spec[0].replicas,
metadata[0].annotations["field.cattle.io/publicEndpoints"],
metadata[0].annotations["cattle.io/status"],
metadata[0].annotations["lifecycle.cattle.io/create.namespace-auth"]

]
}
}
Expand Down Expand Up @@ -163,6 +167,13 @@ resource "kubernetes_ingress_v1" "this" {
}
}
}
lifecycle {
ignore_changes = [
metadata[0].annotations["field.cattle.io/publicEndpoints"],
metadata[0].annotations["cattle.io/status"],
metadata[0].annotations["lifecycle.cattle.io/create.namespace-auth"],
]
}
}
resource "kubernetes_horizontal_pod_autoscaler" "this" {
metadata {
Expand All @@ -180,6 +191,7 @@ resource "kubernetes_horizontal_pod_autoscaler" "this" {
kind = "Deployment"
name = kubernetes_deployment.this.metadata[0].name
}

}
}
resource "kubernetes_pod_disruption_budget" "this" {
Expand All @@ -189,8 +201,7 @@ resource "kubernetes_pod_disruption_budget" "this" {
labels = local.labels
}
spec {
max_unavailable = "20%"
min_available = "50%"
min_available = "50%"
selector {
match_labels = {
k8s-app = kubernetes_deployment.this.metadata[0].labels.k8s-app
Expand Down

0 comments on commit e5f9e7c

Please sign in to comment.