Skip to content

Commit ea28e30

Browse files
committed
fix stuff
1 parent 9292b6c commit ea28e30

File tree

12 files changed

+168
-176
lines changed

12 files changed

+168
-176
lines changed

docs/explanation/observability/metrics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We use Prometheus to fetch metric endpoints from your application (in Prometheus
1010

1111
??? info "Prometheus cluster configuration"
1212
To see the current configuration for a prometheus instance in your cluster, e.g. `scrape_interval`, go to
13-
`https://prometheus.<cluster>.@@TENANT@@.cloud.nais.io/config`
13+
`https://prometheus.<MY-ENV>.<<tenant()>>.cloud.nais.io/config`
1414

1515
```mermaid
1616
graph LR

docs/how-to-guides/NAIS CLI/install.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install
22

3-
=== "macOS Installation"
3+
=== "macOS"
44

55
1. Install [Homebrew](https://brew.sh/) (unless you already have it)
66
2. Add the nais tap
@@ -12,7 +12,7 @@
1212
brew install nais
1313
```
1414

15-
=== "Ubuntu Installation"
15+
=== "Ubuntu"
1616

1717
1. Add the nais PPA repo:
1818
```
@@ -26,7 +26,7 @@
2626
sudo apt install nais
2727
```
2828

29-
=== "Windows Installation"
29+
=== "Windows"
3030

3131
### Install using Scoop
3232

@@ -40,7 +40,7 @@
4040
scoop install nais-cli
4141
```
4242

43-
=== "Manual installation"
43+
=== "Manual"
4444

4545
Download the archive for windows from [nais/cli](https://github.com/nais/cli/releases/latest) and unpack the tool to a directory on your `$PATH`.
4646
If you are unable to run nais after installing, check out our [troubleshooting guide](troubleshooting.md).

docs/how-to-guides/command-line-access.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ A successful run will output how many clusters and where the kubeconfig file is
3939
## 5. Verify access
4040

4141
```shell
42-
kubectl --context '<cluster name>' get ns
42+
kubectl --context '<MY-ENV>' get ns
4343
```
4444

4545
If you are unsure about which clusters are available, you can list them with:

docs/how-to-guides/create-team.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This how-to guide shows you how to create a NAIS team.
66
Creating a team comes with quite a bit of overhead so this excersise should only be completeted if you are not part of a relevant team and just want find your bearings and get started.
77

88
## Prerequisites
9-
- [naisdevice installed](./naisdevice/install-tenant.md)
9+
- [naisdevice installed](./naisdevice/install-naisdevice.md)
1010
- A GitHub Account with access to your org. (eg. navikt)
1111
- A Slack channel that can receive alerts concerning your apps and workloads
1212

docs/how-to-guides/github-action.md

+34-34
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This how-to guide shows you how to build and deploy your application using [Gith
44

55
## Prerequisites
66

7-
- You're part of a [NAIS team](../create-team.md)
7+
- You're part of a [NAIS team](./create-team.md)
88
- A Github repository where the NAIS team has access
9-
- The repository contains a valid [nais.yaml](TODO)
9+
- The repository contains a valid [workload manifest](../explanation/workloads.md)
1010

1111
### 1. Authorize your Github repository for deployment
1212

@@ -16,42 +16,42 @@ This how-to guide shows you how to build and deploy your application using [Gith
1616

1717
### 2. Create a Github workflow
1818

19-
Create a new file in your repository under `.github/workflows/` called `main.yml` with the following content:
20-
2119
!!! note
2220
If you require a more advanced workflow, or already have one. Just copy the relevant parts from the example below.
2321

24-
```yaml
25-
name: Build and deploy
26-
on:
27-
push:
28-
branches:
29-
- main
30-
jobs:
31-
build_and_deploy:
32-
name: Build, push and deploy
33-
runs-on: ubuntu-latest
34-
permissions:
35-
contents: read
36-
id-token: write
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: Push docker image to GAR
40-
uses: nais/docker-build-push@v0
41-
id: docker-build-push
42-
with:
43-
team: <MY-TEAM> # Replace
44-
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # Provided as Organization Secret
45-
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # Provided as Organization Variable
46-
- name: Deploy to NAIS
47-
uses: nais/deploy/actions/deploy@v2
48-
env:
49-
CLUSTER: <MY-CLUSTER> # Replace
50-
RESOURCE: nais.yaml #, topic.yaml, statefulset.yaml, etc.
51-
VAR: image=${{ steps.docker-build-push.outputs.image }}
52-
```
22+
!!! note "./github/workflows/main.yml"
23+
24+
```yaml hl_lines="19 25-26"
25+
name: Build and deploy
26+
on:
27+
push:
28+
branches:
29+
- main
30+
jobs:
31+
build_and_deploy:
32+
name: Build, push and deploy
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
36+
id-token: write
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Push docker image to GAR
40+
uses: nais/docker-build-push@v0
41+
id: docker-build-push
42+
with:
43+
team: <MY-TEAM> # Replace
44+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # Provided as Organization Secret
45+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # Provided as Organization Variable
46+
- name: Deploy to NAIS
47+
uses: nais/deploy/actions/deploy@v2
48+
env:
49+
CLUSTER: <MY-CLUSTER> # Replace
50+
RESOURCE: .nais/app.yaml #, topic.yaml, statefulset.yaml, etc.
51+
VAR: image=${{ steps.docker-build-push.outputs.image }}
52+
```
5353

5454
This example workflow is a minimal example that builds, signs, and pushes your container image to the image registry.
55-
It then deploys the [nais.yaml](TODO), injecting the image tag from the previous step.
55+
It then deploys the [app.yaml](../reference/application-spec.md), injecting the image tag from the previous step.
5656

5757
When this file is pushed to the `main` branch, the workflow will be triggered and you are all set.

docs/how-to-guides/leader-election.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
This guide will show you how to enable leader election for your appliaction
44

5-
## 0. Enable leader election in [manifest](../reference/application-spec.md)
5+
## 0. Enable leader election in [manifest](../reference/application-spec.md#leaderelection)
66

77
???+ note ".nais/app.yaml"
88

9-
```yaml hl_lines="2-3"
9+
```yaml
1010
spec:
11-
leaderElection: true
11+
leaderElection: true
1212
```
1313

1414
## 1. Using leader election in your application

docs/how-to-guides/naisdevice/install-naisdevice.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Device-specific installation steps
44

5-
=== "macOS Installation"
5+
=== "macOS"
66

77
1. [Install Homebrew](https://brew.sh/) unless you already have it.
88

@@ -31,7 +31,7 @@
3131

3232
1. If you need to connect to anything running in K8s cluster, remember to [update your kubeconfig](TODO: missing)
3333

34-
=== "Windows Installation"
34+
=== "Windows"
3535

3636
#### Install using Scoop
3737

@@ -55,14 +55,14 @@
5555
1. If you need to connect to anything running in K8s cluster, remember to [update your kubeconfig](TODO: fix link)
5656
1. Start _naisdevice_ from the _Start menu_
5757

58-
=== "Manual installation"
58+
=== "Manual"
5959

6060
1. [Download and install naisdevice-tenant.exe](https://github.com/nais/device/releases/latest)
6161
(you will be asked for administrator access when you run the installer)
6262
1. If you need to connect to anything running in K8s cluster, remember to [update your kubeconfig](TODO:Fix link)
6363
1. Start _naisdevice_ from the _Start menu_
6464

65-
=== "Ubuntu Installation"
65+
=== "Ubuntu"
6666

6767
!!! warning
6868

docs/how-to-guides/observability/alerts/create.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide shows you how to create alerts for your application.
88

99
You can define alerts by using Kubernetes resources (`PrometheusRule`), as well as directly in Grafana (GUI based).
1010

11-
You will have a separate alertmanager for each environment available at `https://alertmanager.<ENVIRONMENT>.<<tenant()>>.cloud.nais.io/`
11+
You will have a separate alertmanager for each environment available at `https://alertmanager.<MY-ENV>.<<tenant()>>.cloud.nais.io/`
1212

1313
## 1. Create PrometheusRule
1414

@@ -18,8 +18,7 @@ You can define alerts by creating a `PrometheusRule` resource in your teams name
1818

1919
???+ note ".nais/alert.yaml"
2020

21-
```yaml
22-
---
21+
```yaml hl_lines="4-5 7 10 23"
2322
apiVersion: monitoring.coreos.com/v1
2423
kind: PrometheusRule
2524
metadata:
@@ -48,22 +47,22 @@ You can define alerts by creating a `PrometheusRule` resource in your teams name
4847

4948
## 2. Activate the alert
5049
=== "Automatically"
51-
Add the file to your application repository, alongside `nais.yaml` to deploy with [NAIS github action](../../cicd/github-action.md).
50+
Add the file to your application repository, alongside `nais.yaml` to deploy with [NAIS github action](../../github-action.md).
5251
=== "Manually"
5352
```bash
5453
kubectl apply -f ./nais/alert.yaml
5554
```
5655

5756
## 3. Verify your alert
58-
You can see the alerts in the Alertmanager at `https://alertmanager.<ENVIRONMENT>.<<tenant()>>.cloud.nais.io/` and the defined rules in Prometheus at `https://prometheus.<ENVIRONMENT>.<<tenant()>>.cloud.nais.io/rules`
57+
You can see the alerts in the Alertmanager at `https://alertmanager.<MY-ENV>.<<tenant()>>.cloud.nais.io/` and the defined rules in Prometheus at `https://prometheus.<MY-ENV>.<<tenant()>>.cloud.nais.io/rules`
5958

6059
## 4. Disable resolved (Optional)
6160

6261
A message will be automatically sent when the alert is resolved. In some cases this message may be unnecessary and can be disabled by adding the label `send_resolved: "false"`:
6362

6463
```yaml
6564
labels:
66-
namespace: <team namespace> # required
65+
namespace: <MY-TEAM> # required
6766
severity: info
6867
send_resolved: "false"
6968
```

0 commit comments

Comments
 (0)