Browse Source

feat: Update label convention

tags/1.4.0
parent
commit
5ec27c561a
Signed by: christophe.vkerchove <christophe.vkerchove@fxinnovation.com> GPG Key ID: FC22F2DA87F093F1
3 changed files with 27 additions and 13 deletions
  1. +8
    -1
      examples/default/README.md
  2. +8
    -1
      examples/disabled/README.md
  3. +11
    -11
      main.tf

+ 8
- 1
examples/default/README.md View File

@@ -1,6 +1,13 @@
# Default Example

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| azurerm | 1.28.0 |
| random | ~> 2 |

## Providers

| Name | Version |
@@ -12,7 +19,7 @@
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:-----:|
|------|-------------|------|---------|:--------:|
| client\_id | n/a | `string` | n/a | yes |
| client\_secret | n/a | `string` | n/a | yes |
| subscription\_id | n/a | `string` | n/a | yes |


+ 8
- 1
examples/disabled/README.md View File

@@ -1,6 +1,13 @@
# Default Example

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| azurerm | 1.28.0 |
| random | ~> 2 |

## Providers

| Name | Version |
@@ -12,7 +19,7 @@
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:-----:|
|------|-------------|------|---------|:--------:|
| client\_id | n/a | `string` | n/a | yes |
| client\_secret | n/a | `string` | n/a | yes |
| subscription\_id | n/a | `string` | n/a | yes |


+ 11
- 11
main.tf View File

@@ -5,11 +5,11 @@
locals {
application_version = "1.5.0"
labels = {
"app.kubernetes.io/name" = "alertmanager-webhook-servicenow"
"app.kubernetes.io/component" = "exporter"
"app.kubernetes.io/part-of" = "monitoring"
"app.kubernetes.io/managed-by" = "terraform"
"app.kubernetes.io/version" = local.application_version
name = "alertmanager-webhook-servicenow"
component = "exporter"
part-of = "monitoring"
managed-by = "terraform"
version = local.application_version
}
}

@@ -40,7 +40,7 @@ resource "kubernetes_deployment" "this" {
)
labels = merge(
{
"app.kubernetes.io/instance" = var.deployment_name
instance = var.deployment_name
},
local.labels,
var.labels,
@@ -67,8 +67,8 @@ resource "kubernetes_deployment" "this" {
)
labels = merge(
{
"app.kubernetes.io/instance" = var.deployment_name
app = random_string.selector.result
instance = var.deployment_name
app = random_string.selector.result
},
local.labels,
var.labels,
@@ -161,7 +161,7 @@ resource "kubernetes_service" "this" {
)
labels = merge(
{
"app.kubernetes.io/instance" = var.service_name
instance = var.service_name
},
local.labels,
var.labels,
@@ -199,7 +199,7 @@ resource "kubernetes_config_map" "this" {
)
labels = merge(
{
"app.kubernetes.io/instance" = var.config_map_name
instance = var.config_map_name
},
local.labels,
var.labels,
@@ -228,7 +228,7 @@ resource "kubernetes_secret" "this" {
)
labels = merge(
{
"app.kubernetes.io/instance" = var.secret_name
"instance" = var.secret_name
},
local.labels,
var.labels,


Loading…
Cancel
Save