From 40e205ffdeb4869b5fb5d06b76d60a71d72c9eae Mon Sep 17 00:00:00 2001 From: GersonRS Date: Sun, 15 Feb 2026 11:48:01 -0300 Subject: [PATCH 1/2] feat: add load image in pipeline local --- examples/kind/main.tf | 321 +++++++++++++++++++++--------------------- 1 file changed, 162 insertions(+), 159 deletions(-) diff --git a/examples/kind/main.tf b/examples/kind/main.tf index e10bbc2..6c25658 100644 --- a/examples/kind/main.tf +++ b/examples/kind/main.tf @@ -110,7 +110,7 @@ module "postgresql" { } module "keycloak" { - source = "git::https://github.com/GersonRS/modern-gitops-stack-module-keycloak.git?ref=v2.7.0" + source = "git::https://github.com/GersonRS/modern-gitops-stack-module-keycloak.git?ref=develop" cluster_name = local.cluster_name base_domain = local.base_domain @@ -118,6 +118,8 @@ module "keycloak" { cluster_issuer = local.cluster_issuer argocd_project = local.cluster_name + target_revision = "develop" + app_autosync = local.app_autosync database = { host = module.postgresql.cluster_dns @@ -133,7 +135,7 @@ module "keycloak" { } module "oidc" { - source = "git::https://github.com/GersonRS/modern-gitops-stack-module-keycloak.git//oidc_bootstrap?ref=v2.7.0" + source = "git::https://github.com/GersonRS/modern-gitops-stack-module-keycloak.git//oidc_bootstrap?ref=develop" cluster_name = local.cluster_name base_domain = local.base_domain @@ -199,151 +201,151 @@ module "mlflow" { } } -# # module "strimzi" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-strimzi.git?ref=v1.4.3" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # } -# # } - -# # module "kafka" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-kafka.git?ref=v2.11.0" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # traefik = module.traefik.id -# # strimzi = module.strimzi.id -# # } -# # } - -# # module "cp-schema-registry" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-cp-schema-registry.git?ref=v1.3.2" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # kafka_broker_name = module.kafka.broker_name -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # kafka = module.kafka.id -# # } -# # } - -# # module "kafka-ui" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-kafka-ui.git?ref=v1.3.3" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # kafka_broker_name = module.kafka.broker_name -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # kafka = module.kafka.id -# # cp-schema-registry = module.cp-schema-registry.id -# # } -# # } - -# # module "pinot" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-pinot.git?ref=v1.1.1" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # storage = { -# # bucket_name = "pinot" -# # endpoint = module.minio.endpoint -# # access_key = module.minio.minio_root_user_credentials.username -# # secret_access_key = module.minio.minio_root_user_credentials.password -# # } -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # traefik = module.traefik.id -# # minio = module.minio.id -# # } -# # } - -# # module "trino" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-trino.git?ref=v1.1.1" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # pinot_dns = module.pinot.cluster_dns -# # storage = { -# # bucket_name = "trino" -# # endpoint = module.minio.endpoint -# # access_key = module.minio.minio_root_user_credentials.username -# # secret_access_key = module.minio.minio_root_user_credentials.password -# # } -# # database = { -# # user = module.postgresql.credentials.user -# # password = module.postgresql.credentials.password -# # database = "curated" -# # service = module.postgresql.cluster_dns -# # } -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # traefik = module.traefik.id -# # oidc = module.oidc.id -# # minio = module.minio.id -# # postgresql = module.postgresql.id -# # pinot = module.pinot.id -# # } -# # } - -# # module "zookeeper" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-zookeeper.git?ref=v2.0.0" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # dependency_ids = { -# # argocd = module.argocd_bootstrap.id -# # } -# # } - -# # module "nifi" { -# # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-nifi.git?ref=v1.5.0" -# # cluster_name = local.cluster_name -# # base_domain = local.base_domain -# # subdomain = local.subdomain -# # cluster_issuer = local.cluster_issuer -# # argocd_project = local.cluster_name -# # app_autosync = local.app_autosync -# # enable_service_monitor = local.enable_service_monitor -# # oidc = module.oidc.oidc -# # dependency_ids = { -# # zookeeper = module.zookeeper.id -# # } -# # } +# # # module "strimzi" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-strimzi.git?ref=v1.4.3" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # } +# # # } + +# # # module "kafka" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-kafka.git?ref=v2.11.0" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # traefik = module.traefik.id +# # # strimzi = module.strimzi.id +# # # } +# # # } + +# # # module "cp-schema-registry" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-cp-schema-registry.git?ref=v1.3.2" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # kafka_broker_name = module.kafka.broker_name +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # kafka = module.kafka.id +# # # } +# # # } + +# # # module "kafka-ui" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-kafka-ui.git?ref=v1.3.3" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # kafka_broker_name = module.kafka.broker_name +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # kafka = module.kafka.id +# # # cp-schema-registry = module.cp-schema-registry.id +# # # } +# # # } + +# # # module "pinot" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-pinot.git?ref=v1.1.1" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # storage = { +# # # bucket_name = "pinot" +# # # endpoint = module.minio.endpoint +# # # access_key = module.minio.minio_root_user_credentials.username +# # # secret_access_key = module.minio.minio_root_user_credentials.password +# # # } +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # traefik = module.traefik.id +# # # minio = module.minio.id +# # # } +# # # } + +# # # module "trino" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-trino.git?ref=v1.1.1" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # pinot_dns = module.pinot.cluster_dns +# # # storage = { +# # # bucket_name = "trino" +# # # endpoint = module.minio.endpoint +# # # access_key = module.minio.minio_root_user_credentials.username +# # # secret_access_key = module.minio.minio_root_user_credentials.password +# # # } +# # # database = { +# # # user = module.postgresql.credentials.user +# # # password = module.postgresql.credentials.password +# # # database = "curated" +# # # service = module.postgresql.cluster_dns +# # # } +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # traefik = module.traefik.id +# # # oidc = module.oidc.id +# # # minio = module.minio.id +# # # postgresql = module.postgresql.id +# # # pinot = module.pinot.id +# # # } +# # # } + +# # # module "zookeeper" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-zookeeper.git?ref=v2.0.0" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # dependency_ids = { +# # # argocd = module.argocd_bootstrap.id +# # # } +# # # } + +# # # module "nifi" { +# # # source = "git::https://github.com/GersonRS/modern-gitops-stack-module-nifi.git?ref=v1.5.0" +# # # cluster_name = local.cluster_name +# # # base_domain = local.base_domain +# # # subdomain = local.subdomain +# # # cluster_issuer = local.cluster_issuer +# # # argocd_project = local.cluster_name +# # # app_autosync = local.app_autosync +# # # enable_service_monitor = local.enable_service_monitor +# # # oidc = module.oidc.oidc +# # # dependency_ids = { +# # # zookeeper = module.zookeeper.id +# # # } +# # # } module "loki-stack" { source = "git::https://github.com/GersonRS/modern-gitops-stack-module-loki-stack.git//kind?ref=v2.7.0" @@ -534,14 +536,15 @@ module "kube-prometheus-stack" { # # } # module "jupyterhub" { -# source = "git::https://github.com/GersonRS/modern-gitops-stack-module-jupyterhub.git?ref=v1.1.2" -# cluster_name = local.cluster_name -# base_domain = local.base_domain -# subdomain = local.subdomain -# cluster_issuer = local.cluster_issuer -# argocd_project = local.cluster_name -# app_autosync = local.app_autosync -# oidc = module.oidc.oidc +# source = "git::https://github.com/GersonRS/modern-gitops-stack-module-jupyterhub.git?ref=develop" +# cluster_name = local.cluster_name +# base_domain = local.base_domain +# subdomain = local.subdomain +# cluster_issuer = local.cluster_issuer +# argocd_project = local.cluster_name +# app_autosync = local.app_autosync +# oidc = module.oidc.oidc +# target_revision = "develop" # storage = { # bucket_name = "mlflow" # endpoint = module.minio.endpoint @@ -554,9 +557,9 @@ module "kube-prometheus-stack" { # password = module.postgresql.credentials.password # endpoint = module.postgresql.cluster_dns # } -# # mlflow = { -# # endpoint = module.mlflow.cluster_dns -# # } +# mlflow = { +# endpoint = module.mlflow.cluster_dns +# } # # ray = { # # endpoint = module.ray.cluster_dns # # } @@ -566,7 +569,7 @@ module "kube-prometheus-stack" { # oidc = module.oidc.id # minio = module.minio.id # postgresql = module.postgresql.id -# # mlflow = module.mlflow.id +# mlflow = module.mlflow.id # } # } From 8080c83e2e574e94b0e0c1790e6cbc31f5c7ca40 Mon Sep 17 00:00:00 2001 From: GersonRS Date: Sun, 15 Feb 2026 12:00:46 -0300 Subject: [PATCH 2/2] feat: add new workflow --- .github/workflows/modules-commitlinter.yaml | 27 +++++++++++++++++++ .../workflows/modules-docker-build-push.yaml | 1 + .github/workflows/modules-linters.yaml | 13 +-------- 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/modules-commitlinter.yaml diff --git a/.github/workflows/modules-commitlinter.yaml b/.github/workflows/modules-commitlinter.yaml new file mode 100644 index 0000000..0b65e11 --- /dev/null +++ b/.github/workflows/modules-commitlinter.yaml @@ -0,0 +1,27 @@ +--- +# Workflow do GitHub Actions para verificar se o código Terraform está bem formatado e se os commits seguem +# a estrutura de mensagens de commit convencionais (necessário para criar releases automáticas com Release Please). +# +# IMPORTANTE: Este workflow é chamado por outros workflows nos repositórios da Modern Gitops Stack e está +# centralizado aqui para facilitar a manutenção entre módulos. Por isso, certifique-se de não introduzir +# mudanças que quebrem a compatibilidade ao modificar este workflow. + +name: "modules-linters" + +on: + workflow_call: + +jobs: + commits-checks: + runs-on: ubuntu-latest + + steps: + - name: "Fazer checkout do repositório" + uses: actions/checkout@v6 + with: + fetch-depth: 0 # Buscar todo o histórico para todas as tags e branches + + - name: "Verificar mensagens de commit" + uses: docker://aevea/commitsar:0.20.2 + env: + COMMITSAR_CONFIG_PATH : ./.github \ No newline at end of file diff --git a/.github/workflows/modules-docker-build-push.yaml b/.github/workflows/modules-docker-build-push.yaml index 708b486..f057aed 100644 --- a/.github/workflows/modules-docker-build-push.yaml +++ b/.github/workflows/modules-docker-build-push.yaml @@ -88,6 +88,7 @@ jobs: file: ${{ inputs.context }}/${{ inputs.dockerfile }} platforms: ${{ inputs.platforms }} push: ${{ github.event_name != 'pull_request' }} + load: ${{ github.event_name == 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} diff --git a/.github/workflows/modules-linters.yaml b/.github/workflows/modules-linters.yaml index e3084d6..5daf87f 100644 --- a/.github/workflows/modules-linters.yaml +++ b/.github/workflows/modules-linters.yaml @@ -27,15 +27,4 @@ jobs: run: "terraform fmt -check" commits-checks: - runs-on: ubuntu-latest - - steps: - - name: "Fazer checkout do repositório" - uses: actions/checkout@v6 - with: - fetch-depth: 0 # Buscar todo o histórico para todas as tags e branches - - - name: "Verificar mensagens de commit" - uses: docker://aevea/commitsar:0.20.2 - env: - COMMITSAR_CONFIG_PATH : ./.github \ No newline at end of file + uses: GersonRS/modern-gitops-stack/.github/workflows/modules-commitlinter.yaml@main \ No newline at end of file