Skip to content

Commit 1577d18

Browse files
committed
upkeep: NAIS til Nais
1 parent 46c1b3a commit 1577d18

13 files changed

Lines changed: 38 additions & 38 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# NAIS deployment
1+
# Nais deployment
22

33
## Overview
4-
NAIS deploy facilitates application deployment into NAV's Kubernetes clusters.
4+
Nais deploy facilitates application deployment into NAV's Kubernetes clusters.
55

66
Developers push or merge code into the master branch of a Git repository, triggering an automated build using (preferably) Github actions.
77
A successful build produces a Docker image artifact, which is uploaded onto Github package registry.
8-
The final step in the build pipeline sends an API request to NAIS deploy to deploy the Docker image onto one of our Kubernetes clusters.
8+
The final step in the build pipeline sends an API request to Nais deploy to deploy the Docker image onto one of our Kubernetes clusters.
99

1010
![Sequence diagram of deployment components](doc/sequence.png)
1111

@@ -19,7 +19,7 @@ Any fatal error will short-circuit the process with a `error` or `failure` statu
1919
Intermediary statuses will be posted, indicating the current state of the deployment.
2020

2121
## Usage
22-
The usage documentation has been moved to [NAIS platform documentation](https://doc.nais.io/build).
22+
The usage documentation has been moved to [Nais platform documentation](https://doc.nais.io/build).
2323

2424
### Deploy API
2525
_We strongly recommend that teams use the `deploy` cli to deploy, rather than posting directly to `hookd`._
@@ -54,15 +54,15 @@ to track the status of your deployment.
5454
|-------|------|-----------------------------------------------------------------------------------------------|
5555
| resources | list[object] | Array of Kubernetes resources |
5656
| team | string | Team tag |
57-
| cluster | string | Kubernetes cluster, see [NAIS clusters](https://doc.nais.io/workloads/reference/environments) |
57+
| cluster | string | Kubernetes cluster, see [Nais clusters](https://doc.nais.io/workloads/reference/environments) |
5858
| environment | string | GitHub environment |
5959
| owner | string | GitHub repository owner |
6060
| repository | string | GitHub repository name |
6161
| ref | string | GitHub commit hash or tag |
6262
| timestamp | int64 | Current Unix timestamp |
6363

6464
Additionally, the header `X-NAIS-Signature` must contain a keyed-hash message authentication code (HMAC).
65-
The code can be derived by hashing the request body using the SHA256 algorithm together with your team's NAIS Deploy API key.
65+
The code can be derived by hashing the request body using the SHA256 algorithm together with your team's Nais Deploy API key.
6666

6767
#### Response specification
6868

@@ -90,7 +90,7 @@ The code can be derived by hashing the request body using the SHA256 algorithm t
9090
| 400 | NO | The request contains errors and cannot be processed. Check the `message` field for details.
9191
| 403 | MAYBE | Authentication failed. Check that you're supplying the correct `team`; that the team is present on GitHub and has admin access to your repository; that you're using the correct API key; and properly HMAC signing the request. |
9292
| 404 | NO | Wrong URL. |
93-
| 5xx | YES | NAIS deploy is having problems and is currently being fixed. Retry later. |
93+
| 5xx | YES | Nais deploy is having problems and is currently being fixed. Retry later. |
9494

9595

9696
## Application components

actions/deploy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Usage
44

5-
See the [NAIS documentation](https://doc.nais.io/build/how-to/build-and-deploy).
5+
See the [Nais documentation](https://doc.nais.io/build/how-to/build-and-deploy).
66

77
## Configuration options
88

9-
The available configuration options for the NAIS deploy GitHub action.
9+
The available configuration options for the Nais deploy GitHub action.
1010

1111
| Environment variable | Default | Description |
1212
|:---------------------|:-------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

actions/deploy/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'NAIS deploy'
2-
description: 'Deploy to a NAIS cluster'
1+
name: 'Nais deploy'
2+
description: 'Deploy to a Nais cluster'
33
author: '@nais'
44
color: purple
55
icon: zap
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Canary deployer is a CronJob that tries to use NAIS deploy to deploy a canary image to a set of clusters.
1+
Canary deployer is a CronJob that tries to use Nais deploy to deploy a canary image to a set of clusters.
22

33
The monitoring system reads metrics from the canary image, and can tell if the deploy system is lagging.

charts/deployd/templates/alerts.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
groups:
88
- name: deployd
99
rules:
10-
- alert: NAIS deploy canary does not sing
10+
- alert: Nais deploy canary does not sing
1111
expr: |
1212
min(nais_testapp_time_since_deploy{app="nais-deploy-canary",namespace="nais-verification"}) > 900
1313
for: 5m
@@ -16,10 +16,10 @@ spec:
1616
severity: critical
1717
annotations:
1818
summary: |
19-
Problem with NAIS deploy
19+
Problem with Nais deploy
2020
2121
Canary application should deploy every 5 minutes, but has not been deployed successfully in over 20 minutes.
22-
consequence: NAIS deploy is probably unavailable. Some or all users might not be able to deploy
22+
consequence: Nais deploy is probably unavailable. Some or all users might not be able to deploy
2323
action: |
2424
* `kubectl --context management -n nais-system describe job -l app=canary-deployer`
2525
* `kubectl --context management -n nais-system describe deploy hookd`
@@ -31,7 +31,7 @@ spec:
3131
Logs: https://logs.adeo.no/goto/cb6b89c655dcb051fa633ce35070d385
3232
Instrumentation: https://monitoring.nais.io/d/9Wb381o4k/deploy-canary
3333
2nd line: @nais-features
34-
- alert: NAIS deploy canary metric missing
34+
- alert: Nais deploy canary metric missing
3535
expr: |
3636
absent(nais_testapp_time_since_deploy{app="nais-deploy-canary",namespace="nais-verification"})
3737
for: 5m
@@ -43,7 +43,7 @@ spec:
4343
The metric used to determine if the canary application is deployed is missing.
4444
4545
Canary application should produce metrics in order for other alerts to work.
46-
consequence: NAIS deploy might be available, but we can't know.
46+
consequence: Nais deploy might be available, but we can't know.
4747
action: |
4848
* `kubectl --context management -n nais-system describe job -l app=canary-deployer`
4949
* `kubectl --context management -n nais-system describe deploy hookd`

charts/hookd/Feature.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ values:
8282
template: "{{.Management.hookd_frontend_pre_shared_key | quote}}"
8383
description: "The pre-shared key used to authenticate the console-backend"
8484
naisAPI.insecureConnection:
85-
displayName: Insecure connection to NAIS API
85+
displayName: Insecure connection to Nais API
8686
config:
8787
type: bool

cmd/deploy/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func run() error {
4141
deployclient.SetupLogging(*cfg)
4242

4343
// Welcome
44-
log.Infof("NAIS deploy %s", version.Version())
44+
log.Infof("Nais deploy %s", version.Version())
4545

4646
err := cfg.Validate()
4747
if err != nil {
@@ -75,7 +75,7 @@ func run() error {
7575
}
7676

7777
// Start the deploy client's top level trace.
78-
ctx, span = telemetry.Tracer().Start(ctx, "NAIS deploy", otrace.WithSpanKind(otrace.SpanKindClient))
78+
ctx, span = telemetry.Tracer().Start(ctx, "Nais deploy", otrace.WithSpanKind(otrace.SpanKindClient))
7979
defer span.End()
8080

8181
// Print version

doc/sequence.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ database registry as "Docker Hub"
77
participant hookd
88
database db as "Postgres"
99
collections deployd
10-
participant kubernetes as "NAIS"
10+
participant kubernetes as "Nais"
1111

1212
==Build and release==
1313
developer -> github: git push
@@ -59,7 +59,7 @@ hookd -> db: Append deployment status
5959
note left: Error in deployment request
6060
note right: error
6161
hookd -> db: Append deployment status
62-
note left: Internal error in NAIS deploy
62+
note left: Internal error in Nais deploy
6363
note right: error
6464

6565
@enduml

pkg/deployclient/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ type Config struct {
4242
}
4343

4444
func InitConfig(cfg *Config) {
45-
flag.StringVar(&cfg.APIKey, "apikey", os.Getenv("APIKEY"), "NAIS Deploy API key. (env APIKEY)")
45+
flag.StringVar(&cfg.APIKey, "apikey", os.Getenv("APIKEY"), "Nais Deploy API key. (env APIKEY)")
4646
flag.BoolVar(&cfg.Actions, "actions", getEnvBool("ACTIONS", false), "Use GitHub Actions compatible error and warning messages. (env ACTIONS)")
47-
flag.StringVar(&cfg.Cluster, "cluster", os.Getenv("CLUSTER"), "NAIS cluster to deploy into. (env CLUSTER)")
47+
flag.StringVar(&cfg.Cluster, "cluster", os.Getenv("CLUSTER"), "Nais cluster to deploy into. (env CLUSTER)")
4848
flag.StringVar(&cfg.DeployServerURL, "deploy-server", getEnv("DEPLOY_SERVER", DefaultDeployServer), "URL to API server. (env DEPLOY_SERVER)")
4949
flag.BoolVar(&cfg.DryRun, "dry-run", getEnvBool("DRY_RUN", false), "Run templating, but don't actually make any requests. (env DRY_RUN)")
5050
flag.StringVar(&cfg.Environment, "environment", os.Getenv("ENVIRONMENT"), "Environment for GitHub deployment. Autodetected from nais.yaml if not specified. (env ENVIRONMENT)")

pkg/deployclient/deployclient.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ func (d *Deployer) Deploy(ctx context.Context, cfg *Config, deployRequest *pb.De
190190
defer span.End()
191191
deployRequest.TraceParent = telemetry.TraceParentHeader(ctx)
192192

193-
log.Infof("Sending deployment request to NAIS deploy at %s...", cfg.DeployServerURL)
193+
log.Infof("Sending deployment request to Nais deploy at %s...", cfg.DeployServerURL)
194194

195195
sendDeploymentRequest := func() error {
196196
requestContext, requestSpan := telemetry.Tracer().Start(ctx, "Waiting for deploy server")
@@ -216,7 +216,7 @@ func (d *Deployer) Deploy(ctx context.Context, cfg *Config, deployRequest *pb.De
216216
return ErrorWrap(ExitNoDeployment, err)
217217
}
218218

219-
log.Infof("Deployment request accepted by NAIS deploy and dispatched to cluster '%s'.", deployStatus.GetRequest().GetCluster())
219+
log.Infof("Deployment request accepted by Nais deploy and dispatched to cluster '%s'.", deployStatus.GetRequest().GetCluster())
220220

221221
deployRequest.ID = deployStatus.GetRequest().GetID()
222222
telemetry.AddDeploymentRequestSpanAttributes(span, deployStatus.GetRequest())
@@ -262,7 +262,7 @@ func (d *Deployer) Deploy(ctx context.Context, cfg *Config, deployRequest *pb.De
262262
defer summaryFile.Close()
263263
}
264264

265-
summary("## 🚀 NAIS deploy")
265+
summary("## 🚀 Nais deploy")
266266
summary("")
267267
summary("* Detailed trace: [%s](%s)", traceID, cfg.TracingDashboardURL+traceID)
268268
summary("* Request ID: %s", deployRequest.GetID())
@@ -292,12 +292,12 @@ func (d *Deployer) Deploy(ctx context.Context, cfg *Config, deployRequest *pb.De
292292
if err != nil {
293293
connectionLost = true
294294
} else if connectionLost {
295-
log.Infof("Connection to NAIS deploy re-established.")
295+
log.Infof("Connection to Nais deploy re-established.")
296296
}
297297
return err
298298
})
299299
if err != nil {
300-
summary("❌ lost connection to NAIS deploy", deployStatus.GetState(), deployStatus.GetMessage())
300+
summary("❌ lost connection to Nais deploy", deployStatus.GetState(), deployStatus.GetMessage())
301301
return ErrorWrap(ExitUnavailable, err)
302302
}
303303

@@ -309,16 +309,16 @@ func (d *Deployer) Deploy(ctx context.Context, cfg *Config, deployRequest *pb.De
309309
log.Warn(formatGrpcError(err))
310310
break
311311
} else {
312-
summary("❌ lost connection to NAIS deploy", deployStatus.GetState(), deployStatus.GetMessage())
312+
summary("❌ lost connection to Nais deploy", deployStatus.GetState(), deployStatus.GetMessage())
313313
return Errorf(ExitUnavailable, "%s", formatGrpcError(err))
314314
}
315315
}
316316
logDeployStatus(deployStatus)
317317
if deployStatus.GetState() == pb.DeploymentState_inactive {
318-
log.Warn("NAIS deploy has been restarted. Re-sending deployment request...")
318+
log.Warn("Nais deploy has been restarted. Re-sending deployment request...")
319319
err = sendDeploymentRequest()
320320
if err != nil {
321-
summary("❌ lost connection to NAIS deploy", deployStatus.GetState(), deployStatus.GetMessage())
321+
summary("❌ lost connection to Nais deploy", deployStatus.GetState(), deployStatus.GetMessage())
322322
return err
323323
}
324324
} else if deployStatus.GetState().Finished() {

0 commit comments

Comments
 (0)