Browse Source

tech: Use KinD for testing

tags/0.2.0
parent
commit
041e3b7476
Signed by untrusted user: christophe.vkerchove <christophe.vkerchove@fxinnovation.com> GPG Key ID: FC22F2DA87F093F1
6 changed files with 30 additions and 31 deletions
  1. +6
    -0
      CHANGELOG.md
  2. +4
    -27
      Jenkinsfile
  3. +3
    -1
      README.md
  4. +1
    -1
      main.tf
  5. +2
    -2
      outputs.tf
  6. +14
    -0
      variables.tf

+ 6
- 0
CHANGELOG.md View File

@@ -1,4 +1,10 @@

0.2.0 / 2020-03-26
==================

* tech: Use KinD for testing
* feat: Add prometheus alerts as outputs

0.1.0 / 2020-02-19
==================



+ 4
- 27
Jenkinsfile View File

@@ -1,28 +1,5 @@
withCredentials(
[
usernamePassword(
credentialsId: 'azure-fxinnovation-application',
passwordVariable: 'client_secret',
usernameVariable: 'client_id'
),
fxTerraform([
initSSHCredentialId: 'gitea-fx_administrator-key',
runKind: true,
]
){
fxTerraformWithUsernamePassword(
testEnvironmentCredentialId: 'azure-fxinnovation-application',
publishEnvironmentCredentialId: 'azure-fxinnovation-application',
providerUsernameVariableName: 'client_id',
providerPasswordVariableName: 'client_secret',
initSSHCredentialId: 'gitea-fx_administrator-key',
testPlanVars: [
"'subscription_id=e469a261-e6fc-4363-94f1-3d8cdb259ec7'",
"'tenant_id=219647b6-1ea6-409d-b9cc-0893cb535884'",
],
publishPlanVars: [
"'subscription_id=e469a261-e6fc-4363-94f1-3d8cdb259ec7'",
"'tenant_id=219647b6-1ea6-409d-b9cc-0893cb535884'",
],
inspecTarget: 'azure',
inspecSubscriptionId: 'e469a261-e6fc-4363-94f1-3d8cdb259ec7',
inspecTenantId: '219647b6-1ea6-409d-b9cc-0893cb535884'
)
}
)

+ 3
- 1
README.md View File

@@ -31,6 +31,8 @@ Terraform module that will deploy kube-state-metrics on kubernetes.
| image\_version | Tag of the docker image to use. | `string` | `"v1.6.0"` | no |
| labels | Additionnal labels that will be merged on all resources. | `map` | `{}` | no |
| namespace | Namespace in which the module will be deployed. | `string` | `"kube-system"` | no |
| prometheus\_alert\_groups\_rules\_annotations | Map of strings that will be merge on all prometheus alert groups rules annotations. | `map` | `{}` | no |
| prometheus\_alert\_groups\_rules\_labels | Map of strings that will be merge on all prometheus alert groups rules labels. | `map` | `{}` | no |
| rbac\_enabled | Whether or not to enabled rbac on the module. | `bool` | `true` | no |
| replicas | Number of replicas to deploy. | `number` | `1` | no |
| service\_account\_annotations | Additionnal annotations that will be merged for the service\_account. | `map` | `{}` | no |
@@ -48,7 +50,7 @@ Terraform module that will deploy kube-state-metrics on kubernetes.
| cluster\_role\_binding\_name | Name of the cluster\_role\_binding created by the module. |
| cluster\_role\_name | Name of the cluster\_role created by the module. |
| deployment\_name | Name of the deployment created by the module. |
| prometheus\_alert\_groups\_rules | List of ovjects representing prometheus alert groups |
| prometheus\_alert\_groups | List of ovjects representing prometheus alert groups |
| service\_account\_name | Name of the service\_account created by the module. |
| service\_name | Name of the service created by the module. |
| service\_port | Port to be used to access the service. |


+ 1
- 1
main.tf View File

@@ -13,7 +13,7 @@ locals {
port = 8080
service_port = 80
service_port_name = "http"
prometheus_alert_rules_groups = [
prometheus_alert_groups = [
{
"name" = "kube-state-metrics"
"rules" = [


+ 2
- 2
outputs.tf View File

@@ -33,7 +33,7 @@ output "cluster_role_binding_name" {
value = element(concat(kubernetes_cluster_role_binding.this.*.metadata.0.name, [""]), 0)
}

output "prometheus_alert_groups_rules" {
output "prometheus_alert_groups" {
description = "List of ovjects representing prometheus alert groups"
value = var.enabled ? local.prometheus_alert_groups_rules : []
value = var.enabled ? local.prometheus_alert_groups : []
}

+ 14
- 0
variables.tf View File

@@ -27,6 +27,20 @@ variable "rbac_enabled" {
default = true
}

#####
# Prometheus
#####

variable "prometheus_alert_groups_rules_labels" {
description = "Map of strings that will be merge on all prometheus alert groups rules labels."
default = {}
}

variable "prometheus_alert_groups_rules_annotations" {
description = "Map of strings that will be merge on all prometheus alert groups rules annotations."
default = {}
}

#####
# Deployment
#####


Loading…
Cancel
Save