Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ generate-schemas:
# static files

$(STATIK_FILES): go.mod docs/content/en/schemas/*
hack/generate-statik.sh
echo hack/generate-statik.sh
175 changes: 175 additions & 0 deletions docs/content/en/api/skaffold.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,33 @@
"required": false,
"type": "string"
},
{
"name": "event.buildEvent.errCode",
"description": " - STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"in": "query",
"required": false,
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE"
},
{
"name": "event.deployEvent.status",
"in": "query",
Expand All @@ -72,6 +99,33 @@
"required": false,
"type": "string"
},
{
"name": "event.deployEvent.errCode",
"description": " - STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"in": "query",
"required": false,
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE"
},
{
"name": "event.portEvent.localPort",
"in": "query",
Expand Down Expand Up @@ -146,6 +200,33 @@
"required": false,
"type": "string"
},
{
"name": "event.statusCheckEvent.errCode",
"description": " - STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"in": "query",
"required": false,
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE"
},
{
"name": "event.resourceStatusCheckEvent.resource",
"in": "query",
Expand All @@ -170,6 +251,33 @@
"required": false,
"type": "string"
},
{
"name": "event.resourceStatusCheckEvent.errorCode",
"description": " - STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"in": "query",
"required": false,
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE"
},
{
"name": "event.fileSyncEvent.fileCount",
"in": "query",
Expand All @@ -195,6 +303,33 @@
"required": false,
"type": "string"
},
{
"name": "event.fileSyncEvent.errCode",
"description": " - STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"in": "query",
"required": false,
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE"
},
{
"name": "event.debuggingContainerEvent.status",
"in": "query",
Expand Down Expand Up @@ -350,6 +485,9 @@
},
"err": {
"type": "string"
},
"errCode": {
"$ref": "#/definitions/protoErrorCode"
}
},
"description": "`BuildEvent` describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not.\nIf the build fails, an error will be attached to the event."
Expand Down Expand Up @@ -409,6 +547,9 @@
},
"err": {
"type": "string"
},
"errCode": {
"$ref": "#/definitions/protoErrorCode"
}
},
"description": "`DeployEvent` represents the status of a deployment, and is emitted by Skaffold\nanytime a deployment starts or completes, successfully or not."
Expand All @@ -422,6 +563,31 @@
},
"description": "`DeployState` describes the status of the current deploy"
},
"protoErrorCode": {
"type": "string",
"enum": [
"COULD_NOT_DETERMINE",
"STATUS_CHECK_NO_ERROR",
"STATUS_CHECK_UNKNOWN",
"STATUS_CHECK_UNKNOWN_UNSCHEDULABLE",
"STATUS_CHECK_IMAGE_PULL_ERR",
"STATUS_CHECK_CONTAINER_CREATING",
"STATUS_CHECK_RUN_CONTAINER_ERR",
"STATUS_CHECK_CONTAINER_TERMINATED",
"STATUS_CHECK_CONTAINER_WAITING_UNKNOWN",
"STATUS_CHECK_CONTAINER_RESTARTING",
"STATUS_CHECK_NODE_MEMORY_PRESSURE",
"STATUS_CHECK_NODE_DISK_PRESSURE",
"STATUS_CHECK_NODE_NETWORK_UNAVAILABLE",
"STATUS_CHECK_NODE_PID_PRESSURE",
"STATUS_CHECK_NODE_UNSCHEDULABLE",
"STATUS_CHECK_NODE_UNREACHABLE",
"STATUS_CHECK_NODE_NOT_READY"
],
"default": "COULD_NOT_DETERMINE",
"description": "- STATUS_CHECK_IMAGE_PULL_ERR: Container errors\n - STATUS_CHECK_NODE_MEMORY_PRESSURE: K8 infra errors",
"description": "Enum for error codes"
},
"protoEvent": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -467,6 +633,9 @@
},
"err": {
"type": "string"
},
"errCode": {
"$ref": "#/definitions/protoErrorCode"
}
},
"description": "FileSyncEvent describes the sync status."
Expand Down Expand Up @@ -573,6 +742,9 @@
},
"err": {
"type": "string"
},
"errorCode": {
"$ref": "#/definitions/protoErrorCode"
}
},
"description": "A Resource StatusCheck Event, indicates progress for each kubernetes deployment.\nFor every resource, there will be exactly one event with `status` *Succeeded* or *Failed* event.\nThere can be multiple events with `status` *Pending*.\nSkaffold polls for resource status every 0.5 second. If the resource status changes, an event with `status` “Pending”, “Complete” and “Failed”\nwill be sent with the new status."
Expand Down Expand Up @@ -618,6 +790,9 @@
},
"err": {
"type": "string"
},
"errCode": {
"$ref": "#/definitions/protoErrorCode"
}
},
"description": "`StatusCheckEvent` describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed."
Expand Down
32 changes: 32 additions & 0 deletions docs/content/en/docs/references/api/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ If the build fails, an error will be attached to the event.
| artifact | [string](#string) | | artifact name |
| status | [string](#string) | | artifact build status oneof: InProgress, Completed, Failed |
| err | [string](#string) | | error when build status is Failed. |
| errCode | [ErrorCode](#proto.ErrorCode) | | error code representing the error |



Expand Down Expand Up @@ -146,6 +147,7 @@ anytime a deployment starts or completes, successfully or not.
| ----- | ---- | ----- | ----------- |
| status | [string](#string) | | deployment status oneof: InProgress, Completed, Failed |
| err | [string](#string) | | error when status is Failed |
| errCode | [ErrorCode](#proto.ErrorCode) | | error code representing the error |



Expand Down Expand Up @@ -202,6 +204,7 @@ FileSyncEvent describes the sync status.
| image | [string](#string) | | the container image to which files are sycned. |
| status | [string](#string) | | status of file sync. one of: Not Started, In progress, Succeeded, Failed. |
| err | [string](#string) | | error in case of status failed. |
| errCode | [ErrorCode](#proto.ErrorCode) | | error code representing the error |



Expand Down Expand Up @@ -326,6 +329,7 @@ will be sent with the new status.
| status | [string](#string) | | |
| message | [string](#string) | | |
| err | [string](#string) | | |
| errorCode | [ErrorCode](#proto.ErrorCode) | | |



Expand Down Expand Up @@ -409,6 +413,7 @@ will be sent with the new status.
| status | [string](#string) | | |
| message | [string](#string) | | |
| err | [string](#string) | | |
| errCode | [ErrorCode](#proto.ErrorCode) | | error code representing the error |



Expand Down Expand Up @@ -463,6 +468,33 @@ will be sent with the new status.

<!-- end messages -->


<a name="proto.ErrorCode"></a>

### ErrorCode
Enum for error codes

| Name | Number | Description |
| ---- | ------ | ----------- |
| COULD_NOT_DETERMINE | 0 | |
| STATUS_CHECK_NO_ERROR | 300 | |
| STATUS_CHECK_UNKNOWN | 301 | |
| STATUS_CHECK_UNKNOWN_UNSCHEDULABLE | 302 | |
| STATUS_CHECK_IMAGE_PULL_ERR | 351 | Container errors |
| STATUS_CHECK_CONTAINER_CREATING | 352 | |
| STATUS_CHECK_RUN_CONTAINER_ERR | 353 | |
| STATUS_CHECK_CONTAINER_TERMINATED | 354 | |
| STATUS_CHECK_CONTAINER_WAITING_UNKNOWN | 355 | |
| STATUS_CHECK_CONTAINER_RESTARTING | 356 | |
| STATUS_CHECK_NODE_MEMORY_PRESSURE | 400 | K8 infra errors |
| STATUS_CHECK_NODE_DISK_PRESSURE | 401 | |
| STATUS_CHECK_NODE_NETWORK_UNAVAILABLE | 402 | |
| STATUS_CHECK_NODE_PID_PRESSURE | 403 | |
| STATUS_CHECK_NODE_UNSCHEDULABLE | 404 | |
| STATUS_CHECK_NODE_UNREACHABLE | 405 | |
| STATUS_CHECK_NODE_NOT_READY | 406 | |


<!-- end enums -->

<!-- end HasExtensions -->
Expand Down
5 changes: 3 additions & 2 deletions examples/getting-started/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package main

import (
"fmt"
"os"
"time"
)

func main() {
for {
fmt.Println("Hello world!")

fmt.Println("Hello world!!!!!")
os.Exit(1)
time.Sleep(time.Second * 1)
}
}
3 changes: 2 additions & 1 deletion examples/microservices/leeroy-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM golang:1.12.9-alpine3.10 as builder
FROM golang:1.13.1-alpine3.10 as builder
COPY app.go .
RUN go build -o /app .

FROM alpine:3.10

CMD ["./app"]
COPY --from=builder /app .
4 changes: 3 additions & 1 deletion examples/microservices/leeroy-app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"log"
"os"
"net/http"
)

Expand All @@ -12,6 +13,7 @@ func handler(w http.ResponseWriter, r *http.Request) {

func main() {
log.Print("leeroy app server ready")
http.HandleFunc("/", handler)
os.Exit(1)
http.HandleFunc("/", handler)
http.ListenAndServe(":50051", nil)
}
2 changes: 1 addition & 1 deletion examples/microservices/leeroy-web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func handler(w http.ResponseWriter, r *http.Request) {
}

func main() {
log.Print("leeroy web server ready")
log.Print("leeroy WEB server ready")
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}
1 change: 1 addition & 0 deletions examples/microservices/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ build:
- image: leeroy-app
context: ./leeroy-app/
deploy:
statusCheckDeadlineSeconds: 10
kubectl:
manifests:
- ./leeroy-web/kubernetes/*
Expand Down
Loading