Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: github pages build #195

Merged
merged 14 commits into from
Jun 3, 2024
Merged
9 changes: 7 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ kubeconfig_*
*.tfplan

cluster-keys.json

.vscode
30 changes: 23 additions & 7 deletions bootstrap/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Comment on lines +180 to +182
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works but the addon doesn't, can you file an issue on the addon repo and link here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the Gatekeeper deployment's liveness probe doesn't have an initialDelaySeconds set, or it's too low. This can be a problem when not all cluster pods (like coredns, vpc-cpi, etc.) are up and running right away. If Gatekeeper starts too early, it doesn’t retry enough times and fail.

To work around this, I added a dependency, forcing Gatekeeper to wait until all the addons are up and running, which seems to work now. I will see if I can open a PR to adjust this in the addon repo.


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
#---------------------------------------------------------------
Expand All @@ -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" {
Expand Down
18 changes: 18 additions & 0 deletions bootstrap/terraform/values/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -56,3 +66,11 @@ grafana:
gnetId: 14584
revision: 1
datasource: prometheusdatasource
eks:
gnetId: 14623
revision: 1
datasource: prometheusdatasource
ekscontrolplane:
gnetId: 21192
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one! The instances and control plane nodes version can be timeseries count and the version in the legend. With 3 nodes is ok but 300 would be hard to see. Merging this PR is not dependent on that update.

revision: 1
datasource: prometheusdatasource
4 changes: 1 addition & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{%
include-markdown "../README.md"
%}
%}
3 changes: 3 additions & 0 deletions docs/patterns/vault-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
48 changes: 45 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Loading