1773 lines
59 KiB
JSON
1773 lines
59 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Automated Kubernetes deployment updates. Keel is a tool for automating Kubernetes deployment updates.",
|
|
"title": "Keel API",
|
|
"termsOfService": "https://keel.sh/terms/",
|
|
"contact": {
|
|
"name": "Keel Support",
|
|
"url": "https://keel.sh",
|
|
"email": "support@keel.sh"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "1.0"
|
|
},
|
|
"host": "localhost:9300",
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/healthz": {
|
|
"get": {
|
|
"description": "Returns 200 OK if the service is healthy",
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"health"
|
|
],
|
|
"summary": "Health check endpoint",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/approvals": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a list of all approvals (both active and archived)",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"approvals"
|
|
],
|
|
"summary": "List approvals",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/types.Approval"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Sets or removes approval requirements for a resource",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"approvals"
|
|
],
|
|
"summary": "Update approval requirements",
|
|
"parameters": [
|
|
{
|
|
"description": "Approval update request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.resourceApprovalsUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Performs an action on an approval (approve, reject, delete, or archive)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"approvals"
|
|
],
|
|
"summary": "Approve, reject, delete, or archive an approval",
|
|
"parameters": [
|
|
{
|
|
"description": "Approval action request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.approveRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/types.Approval"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Approval not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/audit": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns paginated audit logs with optional filtering",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"audit"
|
|
],
|
|
"summary": "Get audit logs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Maximum number of results",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Offset for pagination",
|
|
"name": "offset",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Comma-separated list of resource kinds to filter",
|
|
"name": "filter",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filter by email",
|
|
"name": "email",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.auditLogsResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/auth/info": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns information about the currently authenticated user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Get current user info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.UserInfo"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/auth/login": {
|
|
"post": {
|
|
"description": "Authenticates a user with username and password",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Login user",
|
|
"parameters": [
|
|
{
|
|
"description": "Login credentials",
|
|
"name": "credentials",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.loginRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.loginResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Username or password incorrect",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/auth/logout": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Logs out the currently authenticated user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Logout user",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Logs out the currently authenticated user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Logout user",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/auth/refresh": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Generates a new authentication token for the current user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Refresh authentication token",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.loginResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/auth/user": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns information about the currently authenticated user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Get current user info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.UserInfo"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/policies": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Updates the Keel policy for a specific resource",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"policies"
|
|
],
|
|
"summary": "Update resource policy",
|
|
"parameters": [
|
|
{
|
|
"description": "Policy update request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.resourcePolicyUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/resources": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a list of all tracked Kubernetes resources with their policies",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"resources"
|
|
],
|
|
"summary": "List resources",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/http.resource"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/stats": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns aggregated statistics about webhooks, approvals, and updates",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stats"
|
|
],
|
|
"summary": "Get statistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tracked": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a list of all tracked container images with their triggers and policies",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"tracked"
|
|
],
|
|
"summary": "List tracked images",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/http.trackedImage"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Updates the trigger type and poll schedule for a tracked resource",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"tracked"
|
|
],
|
|
"summary": "Update tracking settings",
|
|
"parameters": [
|
|
{
|
|
"description": "Track settings request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.trackRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/http.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Resource not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/azure": {
|
|
"post": {
|
|
"description": "Receives and processes Azure Container Registry webhook notifications for image push events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger Azure Container Registry webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "Azure webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.azureWebhook"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/dockerhub": {
|
|
"post": {
|
|
"description": "Receives and processes DockerHub webhook notifications for image push events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger DockerHub webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "DockerHub webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.dockerHubWebhook"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/github": {
|
|
"post": {
|
|
"description": "Receives and processes GitHub webhook notifications for container registry events (both GitHub Packages and GitHub Container Registry)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger GitHub webhook",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "GitHub event type (package or registry_package)",
|
|
"name": "X-GitHub-Event",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "GitHub webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/harbor": {
|
|
"post": {
|
|
"description": "Receives and processes Harbor registry webhook notifications for image push events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger Harbor webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "Harbor webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.harborWebhook"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/jfrog": {
|
|
"post": {
|
|
"description": "Receives and processes JFrog Artifactory webhook notifications for image push events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger JFrog webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "JFrog webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.jfrogWebhook"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/native": {
|
|
"post": {
|
|
"description": "Triggers a deployment update event directly with repository and tag information",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger native webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "Repository information with name and tag",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/types.Repository"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/quay": {
|
|
"post": {
|
|
"description": "Receives and processes Quay.io webhook notifications for image push events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger Quay webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "Quay webhook payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.quayWebhook"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/registry": {
|
|
"post": {
|
|
"description": "Receives and processes Docker Registry V2 notification webhooks for image push events. Compatible with Docker Registry, GitLab Container Registry, and Harbor.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"text/plain"
|
|
],
|
|
"tags": [
|
|
"webhooks"
|
|
],
|
|
"summary": "Trigger Docker Registry notification webhook",
|
|
"parameters": [
|
|
{
|
|
"description": "Registry notification payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/http.registryNotification"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/version": {
|
|
"get": {
|
|
"description": "Returns the current version information of Keel",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"health"
|
|
],
|
|
"summary": "Get Keel version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/types.VersionInfo"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"http.APIResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.UserInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"last_login_ip": {
|
|
"type": "string"
|
|
},
|
|
"last_login_time": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"role_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.approveRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"description": "defaults to approve",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"voter": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.auditLogsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/types.AuditLog"
|
|
}
|
|
},
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"offset": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"http.azureWebhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"digest": {
|
|
"type": "string"
|
|
},
|
|
"repository": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"http.dockerHubWebhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"callback_url": {
|
|
"type": "string"
|
|
},
|
|
"push_data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"images": {
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"pushed_at": {
|
|
"type": "integer"
|
|
},
|
|
"pusher": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"repository": {
|
|
"type": "object",
|
|
"properties": {
|
|
"comment_count": {
|
|
"type": "integer"
|
|
},
|
|
"date_created": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"dockerfile": {
|
|
"type": "string"
|
|
},
|
|
"full_description": {
|
|
"type": "string"
|
|
},
|
|
"is_official": {
|
|
"type": "boolean"
|
|
},
|
|
"is_private": {
|
|
"type": "boolean"
|
|
},
|
|
"is_trusted": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"type": "string"
|
|
},
|
|
"repo_name": {
|
|
"type": "string"
|
|
},
|
|
"repo_url": {
|
|
"type": "string"
|
|
},
|
|
"star_count": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"http.harborWebhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"event_data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"repository": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date_created": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"repo_full_name": {
|
|
"type": "string"
|
|
},
|
|
"repo_type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"resources": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"digest": {
|
|
"type": "string"
|
|
},
|
|
"resource_url": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"occur_at": {
|
|
"type": "integer"
|
|
},
|
|
"operator": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.jfrogWebhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"image_name": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"platforms": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"architecture": {
|
|
"type": "string"
|
|
},
|
|
"os": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"repo_key": {
|
|
"type": "string"
|
|
},
|
|
"sha256": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"event_type": {
|
|
"type": "string"
|
|
},
|
|
"jpd_origin": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"subscription_key": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.loginRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.loginResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.quayWebhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docker_url": {
|
|
"type": "string"
|
|
},
|
|
"homepage": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"repository": {
|
|
"type": "string"
|
|
},
|
|
"updated_tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"http.registryNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"actor": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"addr": {
|
|
"type": "string"
|
|
},
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"method": {
|
|
"type": "string"
|
|
},
|
|
"useragent": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"source": {
|
|
"type": "object",
|
|
"properties": {
|
|
"addr": {
|
|
"type": "string"
|
|
},
|
|
"instanceID": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"digest": {
|
|
"type": "string"
|
|
},
|
|
"length": {
|
|
"type": "integer"
|
|
},
|
|
"mediaType": {
|
|
"type": "string"
|
|
},
|
|
"repository": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"timestamp": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"http.resource": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annotations": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"policy": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/k8s.Status"
|
|
}
|
|
}
|
|
},
|
|
"http.resourceApprovalsUpdateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
},
|
|
"votesRequired": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"http.resourcePolicyUpdateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"policy": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.trackRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
},
|
|
"schedule": {
|
|
"type": "string"
|
|
},
|
|
"trigger": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"http.trackedImage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"policy": {
|
|
"type": "string"
|
|
},
|
|
"pollSchedule": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
},
|
|
"registry": {
|
|
"type": "string"
|
|
},
|
|
"trigger": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"k8s.Status": {
|
|
"type": "object",
|
|
"properties": {
|
|
"availableReplicas": {
|
|
"description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.\n+optional",
|
|
"type": "integer"
|
|
},
|
|
"readyReplicas": {
|
|
"description": "Total number of ready pods targeted by this deployment.\n+optional",
|
|
"type": "integer"
|
|
},
|
|
"replicas": {
|
|
"description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).\n+optional",
|
|
"type": "integer"
|
|
},
|
|
"unavailableReplica": {
|
|
"description": "Total number of unavailable pods targeted by this deployment. This is the total number of\npods that are still required for the deployment to have 100% available capacity. They may\neither be pods that are running but not yet available or pods that still have not been created.\n+optional",
|
|
"type": "integer"
|
|
},
|
|
"updatedReplicas": {
|
|
"description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.\n+optional",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.Approval": {
|
|
"type": "object",
|
|
"properties": {
|
|
"archived": {
|
|
"description": "Archived is set to true once approval is finally approved/rejected",
|
|
"type": "boolean"
|
|
},
|
|
"createdAt": {
|
|
"description": "When this approval was created",
|
|
"type": "string"
|
|
},
|
|
"currentVersion": {
|
|
"type": "string"
|
|
},
|
|
"deadline": {
|
|
"description": "Deadline for this request",
|
|
"type": "string"
|
|
},
|
|
"digest": {
|
|
"description": "Digest is used to verify that images are the ones that got the approvals.\nIf digest doesn't match for the image, votes are reset.",
|
|
"type": "string"
|
|
},
|
|
"event": {
|
|
"description": "Event that triggered evaluation",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/types.Event"
|
|
}
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"identifier": {
|
|
"description": "Identifier is used to inform user about specific\nHelm release or k8s deployment\nie: k8s \u003cnamespace\u003e/\u003cdeployment name\u003e\n helm: \u003cnamespace\u003e/\u003crelease name\u003e",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"newVersion": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"description": "Provider name - Kubernetes/Helm",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/types.ProviderType"
|
|
}
|
|
]
|
|
},
|
|
"rejected": {
|
|
"description": "Explicitly rejected approval\ncan be set directly by user\nso even if deadline is not reached approval\ncould be turned down",
|
|
"type": "boolean"
|
|
},
|
|
"updatedAt": {
|
|
"description": "WHen this approval was updated",
|
|
"type": "string"
|
|
},
|
|
"voters": {
|
|
"description": "Voters is a list of voter\nIDs for audit",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/types.JSONB"
|
|
}
|
|
]
|
|
},
|
|
"votesReceived": {
|
|
"type": "integer"
|
|
},
|
|
"votesRequired": {
|
|
"description": "Requirements for the update such as number of votes\nand deadline",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"types.AuditLog": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accountId": {
|
|
"type": "string"
|
|
},
|
|
"action": {
|
|
"description": "create/delete/update",
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"$ref": "#/definitions/types.JSONB"
|
|
},
|
|
"payload": {
|
|
"description": "can be used for bigger messages such as webhook payload",
|
|
"type": "string"
|
|
},
|
|
"payloadType": {
|
|
"type": "string"
|
|
},
|
|
"resourceKind": {
|
|
"description": "approval/deployment/daemonset/statefulset/etc...",
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.Event": {
|
|
"type": "object",
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"repository": {
|
|
"$ref": "#/definitions/types.Repository"
|
|
},
|
|
"triggerName": {
|
|
"description": "optional field to identify trigger",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.JSONB": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"types.ProviderType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"ProviderTypeUnknown",
|
|
"ProviderTypeKubernetes",
|
|
"ProviderTypeHelm"
|
|
]
|
|
},
|
|
"types.Repository": {
|
|
"type": "object",
|
|
"properties": {
|
|
"digest": {
|
|
"description": "optional digest field",
|
|
"type": "string"
|
|
},
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"types.VersionInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"type": "string"
|
|
},
|
|
"arch": {
|
|
"type": "string"
|
|
},
|
|
"buildDate": {
|
|
"type": "string"
|
|
},
|
|
"experimental": {
|
|
"type": "boolean"
|
|
},
|
|
"goVersion": {
|
|
"type": "string"
|
|
},
|
|
"kernelVersion": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"os": {
|
|
"type": "string"
|
|
},
|
|
"revision": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |