Skip to content

Commit

Permalink
Convert maintenance windows to sync windows (argoproj#2416)
Browse files Browse the repository at this point in the history
Convert maintenance windows to sync windows (argoproj#2416)
  • Loading branch information
adamjohnson01 authored and Alexander Matyushentsev committed Oct 8, 2019
1 parent 963300a commit 5abe863
Show file tree
Hide file tree
Showing 43 changed files with 3,918 additions and 2,927 deletions.
237 changes: 130 additions & 107 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,31 +347,6 @@
}
}
},
"/api/v1/applications/{name}/maintenance": {
"get": {
"tags": [
"ApplicationService"
],
"summary": "Get returns an application by name",
"operationId": "GetApplicationMaintenanceState",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/applicationApplicationMaintenanceResponse"
}
}
}
}
},
"/api/v1/applications/{name}/manifests": {
"get": {
"tags": [
Expand Down Expand Up @@ -813,6 +788,31 @@
}
}
},
"/api/v1/applications/{name}/syncwindows": {
"get": {
"tags": [
"ApplicationService"
],
"summary": "Get returns an application by name",
"operationId": "GetApplicationSyncWindows",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/applicationApplicationSyncWindowsResponse"
}
}
}
}
},
"/api/v1/certificates": {
"get": {
"tags": [
Expand Down Expand Up @@ -1167,13 +1167,13 @@
}
}
},
"/api/v1/projects/{name}/maintenance": {
"/api/v1/projects/{name}/syncwindows": {
"get": {
"tags": [
"ProjectService"
],
"summary": "GetMaintenanceState returns true if there are any active maintenance windows",
"operationId": "GetMaintenanceState",
"summary": "GetSchedulesState returns true if there are any active sync syncWindows",
"operationId": "GetSyncWindowsState",
"parameters": [
{
"type": "string",
Expand All @@ -1186,7 +1186,7 @@
"200": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/projectMaintenanceResponse"
"$ref": "#/definitions/projectSyncWindowsResponse"
}
}
}
Expand Down Expand Up @@ -1690,17 +1690,6 @@
"accountUpdatePasswordResponse": {
"type": "object"
},
"applicationApplicationMaintenanceResponse": {
"type": "object",
"properties": {
"windows": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"applicationApplicationPatchRequest": {
"type": "object",
"title": "ApplicationPatchRequest is a request to patch an application",
Expand Down Expand Up @@ -1782,6 +1771,45 @@
}
}
},
"applicationApplicationSyncWindow": {
"type": "object",
"properties": {
"duration": {
"type": "string"
},
"kind": {
"type": "string"
},
"manualSync": {
"type": "boolean",
"format": "boolean"
},
"schedule": {
"type": "string"
}
}
},
"applicationApplicationSyncWindowsResponse": {
"type": "object",
"properties": {
"activeWindows": {
"type": "array",
"items": {
"$ref": "#/definitions/applicationApplicationSyncWindow"
}
},
"assignedWindows": {
"type": "array",
"items": {
"$ref": "#/definitions/applicationApplicationSyncWindow"
}
},
"canSync": {
"type": "boolean",
"format": "boolean"
}
}
},
"applicationLogEntry": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1971,17 +1999,6 @@
"projectEmptyResponse": {
"type": "object"
},
"projectMaintenanceResponse": {
"type": "object",
"properties": {
"windows": {
"type": "array",
"items": {
"$ref": "#/definitions/v1alpha1ProjectMaintenanceWindow"
}
}
}
},
"projectProjectCreateRequest": {
"description": "ProjectCreateRequest defines project creation parameters.",
"type": "object",
Expand Down Expand Up @@ -2032,6 +2049,17 @@
}
}
},
"projectSyncWindowsResponse": {
"type": "object",
"properties": {
"windows": {
"type": "array",
"items": {
"$ref": "#/definitions/v1alpha1SyncWindow"
}
}
}
},
"repositoryAppInfo": {
"type": "object",
"title": "AppInfo contains application type and app file path",
Expand Down Expand Up @@ -2821,9 +2849,6 @@
"$ref": "#/definitions/v1alpha1ApplicationDestination"
}
},
"maintenance": {
"$ref": "#/definitions/v1alpha1ProjectMaintenance"
},
"namespaceResourceBlacklist": {
"type": "array",
"title": "NamespaceResourceBlacklist contains list of blacklisted namespace level resources",
Expand All @@ -2847,6 +2872,13 @@
"items": {
"type": "string"
}
},
"syncWindows": {
"type": "array",
"title": "SyncWindows controls when syncs can be run for apps in this project",
"items": {
"$ref": "#/definitions/v1alpha1SyncWindow"
}
}
}
},
Expand Down Expand Up @@ -3451,59 +3483,6 @@
}
}
},
"v1alpha1ProjectMaintenance": {
"type": "object",
"title": "Project Maintenance controls when syncs can be run for apps in a project",
"properties": {
"enabled": {
"type": "boolean",
"format": "boolean",
"title": "Enabled will allow maintenance windows to be active during their scheduled times"
},
"windows": {
"type": "array",
"title": "Windows contains the schedules for when syncs should be disabled",
"items": {
"$ref": "#/definitions/v1alpha1ProjectMaintenanceWindow"
}
}
}
},
"v1alpha1ProjectMaintenanceWindow": {
"type": "object",
"title": "MaintenanceWindow contains the time, duration and attributes that are used to assign the windows to apps",
"properties": {
"applications": {
"type": "array",
"title": "Applications contains a list of applications that the window will apply to",
"items": {
"type": "string"
}
},
"clusters": {
"type": "array",
"title": "Clusters contains a list of clusters that the window will apply to",
"items": {
"type": "string"
}
},
"duration": {
"type": "string",
"title": "Duration is the amount of time the maintenance window will be open"
},
"namespaces": {
"type": "array",
"title": "Namespaces contains a list of namespaces that the window will apply to",
"items": {
"type": "string"
}
},
"schedule": {
"type": "string",
"title": "Schedule is the time the window will begin, specified in cron format"
}
}
},
"v1alpha1ProjectRole": {
"type": "object",
"title": "ProjectRole represents a role that has access to a project",
Expand Down Expand Up @@ -4121,6 +4100,50 @@
}
}
},
"v1alpha1SyncWindow": {
"type": "object",
"title": "SyncWindow contains the kind, time, duration and attributes that are used to assign the syncWindows to apps",
"properties": {
"applications": {
"type": "array",
"title": "Applications contains a list of applications that the window will apply to",
"items": {
"type": "string"
}
},
"clusters": {
"type": "array",
"title": "Clusters contains a list of clusters that the window will apply to",
"items": {
"type": "string"
}
},
"duration": {
"type": "string",
"title": "Duration is the amount of time the sync window will be open"
},
"kind": {
"type": "string",
"title": "Kind defines if the window allows or blocks syncs"
},
"manualSync": {
"type": "boolean",
"format": "boolean",
"title": "ManualSync enables manual syncs when they would otherwise be blocked"
},
"namespaces": {
"type": "array",
"title": "Namespaces contains a list of namespaces that the window will apply to",
"items": {
"type": "string"
}
},
"schedule": {
"type": "string",
"title": "Schedule is the time the window will begin, specified in cron format"
}
}
},
"v1alpha1TLSClientConfig": {
"type": "object",
"title": "TLSClientConfig contains settings to enable transport layer security",
Expand Down
Loading

0 comments on commit 5abe863

Please sign in to comment.