diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index af4ea97d..0ba07f87 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -37,8 +37,13 @@ jobs: python -m pip install --upgrade pip python -m pip install mkdocs-material==9.5.21 \ mkdocs-include-markdown-plugin==6.0.6 \ - mkdocs-awesome-pages-plugin==2.9.2 - + mkdocs-awesome-pages-plugin==2.9.2 \ + mkdocs-glightbox==0.1.0 \ + mkdocs-minify-plugin==0.8.0 \ + mkdocs-material-extensions==1.3.1 \ + pillow==10.3.0 \ + cairosvg==2.7.1 + - name: git config run: | git config --local user.email "action@github.com" diff --git a/.gitignore b/.gitignore index bbb1f65c..ad30e6b9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ kubeconfig_* *.tfplan cluster-keys.json + +.vscode \ No newline at end of file diff --git a/bootstrap/terraform/main.tf b/bootstrap/terraform/main.tf index 4f51e50e..ee6bea6f 100644 --- a/bootstrap/terraform/main.tf +++ b/bootstrap/terraform/main.tf @@ -159,12 +159,6 @@ module "eks_blueprints_addons" { crossplane_kubernetes_provider_enable = local.kubernetes_provider.enable })] } - enable_gatekeeper = true - gatekeeper = { - wait = true - wait_for_jobs = true - timeout = "600" - } enable_metrics_server = true enable_aws_load_balancer_controller = true @@ -180,6 +174,26 @@ module "eks_blueprints_addons" { depends_on = [module.eks.eks_managed_node_groups] } +#--------------------------------------------------------------- +# Gatekeeper +#--------------------------------------------------------------- +module "gatekeeper" { + source = "aws-ia/eks-blueprints-addon/aws" + version = "1.1.1" + + name = "gatekeeper" + description = "A Helm chart to deploy gatekeeper project" + namespace = "gatekeeper-system" + create_namespace = true + chart = "gatekeeper" + chart_version = "3.16.3" + repository = "https://open-policy-agent.github.io/gatekeeper/charts" + wait = true + timeout = "600" + + depends_on = [module.eks_blueprints_addons] +} + #--------------------------------------------------------------- # Crossplane #--------------------------------------------------------------- @@ -194,9 +208,11 @@ module "crossplane" { chart = "crossplane" chart_version = "1.16.0" repository = "https://charts.crossplane.io/stable/" + wait = true + timeout = "600" values = [file("${path.module}/values/crossplane.yaml")] - depends_on = [module.eks.eks_managed_node_groups] + depends_on = [module.eks_blueprints_addons] } resource "kubectl_manifest" "environmentconfig" { diff --git a/bootstrap/terraform/values/prometheus.yaml b/bootstrap/terraform/values/prometheus.yaml index b83c6275..4757df85 100644 --- a/bootstrap/terraform/values/prometheus.yaml +++ b/bootstrap/terraform/values/prometheus.yaml @@ -11,6 +11,16 @@ prometheus: podMetricsEndpoints: - port: "metrics" selector: {} + additionalServiceMonitors: + - name: "argocd" + namespaceSelector: + matchNames: + - "argocd" + endpoints: + - port: "metrics" + selector: + matchLabels: + prometheus.io/scrape: "true" grafana: service: type: "LoadBalancer" @@ -56,3 +66,11 @@ grafana: gnetId: 14584 revision: 1 datasource: prometheusdatasource + eks: + gnetId: 14623 + revision: 1 + datasource: prometheusdatasource + ekscontrolplane: + gnetId: 21192 + revision: 1 + datasource: prometheusdatasource diff --git a/docs/getting-started.md b/docs/getting-started.md index 4e410a4c..8f09f4f0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -18,9 +18,7 @@ Ensure that you have installed the following tools locally: ### terraform -1. For consuming Crossplane Blueprints, please see the [Getting Started](https://awslabs.github.io/crossplane-on-eks/#getting-started) section. For exploring and trying out the patterns provided, please -clone the project locally to quickly get up and running with a pattern. After cloning the project locally, `cd` into the pattern -directory of your choice. +1. For consuming Crossplane Blueprints, please see the [Getting Started](https://awslabs.github.io/crossplane-on-eks/getting-started/) section. For exploring and trying out the patterns provided, please clone the project locally to quickly get up and running with a pattern. After cloning the project locally, `cd` into the pattern directory of your choice. 2. To provision the pattern, the typical steps of execution are as follows: diff --git a/docs/index.md b/docs/index.md index 4129e67e..6601cbc9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,3 @@ {% include-markdown "../README.md" -%} +%} \ No newline at end of file diff --git a/docs/patterns/vault-integration.md b/docs/patterns/vault-integration.md index ff71992b..99d05e5a 100644 --- a/docs/patterns/vault-integration.md +++ b/docs/patterns/vault-integration.md @@ -125,6 +125,7 @@ vault write auth/kubernetes/role/crossplane \ For our test cases to work, we need to configure additional Vault policy and role. Run the following commands in your vault pod or VM. ```bash +# {% raw %} # create policy and role for applications to use. ACCESSOR=$(vault auth list | grep kubernetes | tr -s ' ' | cut -d ' ' -f3) @@ -142,6 +143,8 @@ vault write auth/kubernetes/role/k8s-application \ bound_service_account_namespaces="*" \ policies=k8s-application \ ttl=1h + +# {% endraw %} ``` ## Install and configure Crossplane diff --git a/mkdocs.yml b/mkdocs.yml index 71d755cc..7d1f240f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ site_name: Amazon Crossplane Blueprints -docs_dir: docs/ +docs_dir: docs copyright: Copyright © Amazon 2024 site_author: AWS site_url: https://awslabs.github.io/crossplane-on-eks/ @@ -13,8 +13,20 @@ theme: font: text: ember palette: - primary: orange - accent: orange + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/weather-night + name: Switch to dark mode + primary: orange + accent: orange + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/weather-sunny + name: Switch to light mode + primary: orange + accent: orange icon: repo: fontawesome/brands/github admonition: @@ -31,13 +43,32 @@ theme: example: octicons/beaker-16 quote: octicons/quote-16 features: + - header.autohide - navigation.tabs.sticky + - navigation.instant + - navigation.sections + - navigation.top + - search.highlight + - search.share + - search.suggest + - content.code.annotate + - content.tooltips + - content.tabs.link + - content.code.copy highlightjs: true hljs_languages: - yaml - json + - bash plugins: + - glightbox + - minify: + minify_html: true + - social: + cards: true + cards_layout_options: + font_family: Roboto - include-markdown - search: lang: @@ -47,6 +78,9 @@ plugins: extra: version: provider: mike + social: + - icon: fontawesome/brands/github-alt + link: https://github.com/awslabs/crossplane-on-eks markdown_extensions: - attr_list @@ -63,5 +97,13 @@ markdown_extensions: - pymdownx.inlinehilite - pymdownx.snippets - pymdownx.superfences + - pymdownx.tasklist: + custom_checkbox: true - toc: permalink: true + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg + +extra_javascript: + - https://cdn.jsdelivr.net/npm/@glidejs/glide