Skip to content

Commit

Permalink
Merge pull request #371 from openinfradev/snr_fix
Browse files Browse the repository at this point in the history
feature. add email template for systemNotification
  • Loading branch information
ktkfree authored Apr 11, 2024
2 parents eff7241 + 994fbc3 commit 84df1ec
Show file tree
Hide file tree
Showing 8 changed files with 430 additions and 3 deletions.
106 changes: 105 additions & 1 deletion api/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6960,6 +6960,64 @@ const docTemplate = `{
}
}
},
"/organizations/{organizationId}/projects/{projectId}/namespaces/{projectNamespace}/stacks/{stackId}/kubeconfig": {
"get": {
"security": [
{
"JWT": []
}
],
"description": "Get project namespace kubeconfig",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Get project namespace kubeconfig",
"parameters": [
{
"type": "string",
"description": "Organization ID",
"name": "organizationId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Project ID",
"name": "projectId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Stack ID",
"name": "stackId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Project Namespace",
"name": "projectNamespace",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceKubeConfigResponse"
}
}
}
}
},
"/organizations/{organizationId}/projects/{projectId}/namespaces/{projectNamespace}/stacks/{stackId}/resources-usage": {
"get": {
"security": [
Expand Down Expand Up @@ -8440,7 +8498,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.ListStackPolicyStatusResponse"
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatistics"
}
}
}
Expand Down Expand Up @@ -12480,6 +12538,14 @@ const docTemplate = `{
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceKubeConfigResponse": {
"type": "object",
"properties": {
"kubeConfig": {
"type": "string"
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceResourcesUsageResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -13335,6 +13401,12 @@ const docTemplate = `{
"dryrun": {
"type": "integer"
},
"fromOrgTemplate": {
"type": "integer"
},
"fromTksTemplate": {
"type": "integer"
},
"total": {
"type": "integer"
},
Expand Down Expand Up @@ -13709,6 +13781,9 @@ const docTemplate = `{
"description": {
"type": "string"
},
"grafanaUrl": {
"type": "string"
},
"namespace": {
"type": "string"
},
Expand Down Expand Up @@ -14172,6 +14247,29 @@ const docTemplate = `{
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatistics": {
"type": "object",
"properties": {
"outofdatePolicyCount": {
"type": "integer"
},
"outofdateTemplateCount": {
"type": "integer"
},
"totalPolicyCount": {
"type": "integer"
},
"totalTemplateCount": {
"type": "integer"
},
"uptodatePolicyCount": {
"type": "integer"
},
"uptodateTemplateCount": {
"type": "integer"
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatusResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -14582,6 +14680,9 @@ const docTemplate = `{
"name": {
"type": "string"
},
"notificationType": {
"type": "string"
},
"systemNotificationCondition": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.SystemNotificationConditionResponse"
},
Expand Down Expand Up @@ -14635,6 +14736,9 @@ const docTemplate = `{
"name": {
"type": "string"
},
"notificationType": {
"type": "string"
},
"organizations": {
"type": "array",
"items": {
Expand Down
106 changes: 105 additions & 1 deletion api/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6954,6 +6954,64 @@
}
}
},
"/organizations/{organizationId}/projects/{projectId}/namespaces/{projectNamespace}/stacks/{stackId}/kubeconfig": {
"get": {
"security": [
{
"JWT": []
}
],
"description": "Get project namespace kubeconfig",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Projects"
],
"summary": "Get project namespace kubeconfig",
"parameters": [
{
"type": "string",
"description": "Organization ID",
"name": "organizationId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Project ID",
"name": "projectId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Stack ID",
"name": "stackId",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Project Namespace",
"name": "projectNamespace",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceKubeConfigResponse"
}
}
}
}
},
"/organizations/{organizationId}/projects/{projectId}/namespaces/{projectNamespace}/stacks/{stackId}/resources-usage": {
"get": {
"security": [
Expand Down Expand Up @@ -8434,7 +8492,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.ListStackPolicyStatusResponse"
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatistics"
}
}
}
Expand Down Expand Up @@ -12474,6 +12532,14 @@
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceKubeConfigResponse": {
"type": "object",
"properties": {
"kubeConfig": {
"type": "string"
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.GetProjectNamespaceResourcesUsageResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -13329,6 +13395,12 @@
"dryrun": {
"type": "integer"
},
"fromOrgTemplate": {
"type": "integer"
},
"fromTksTemplate": {
"type": "integer"
},
"total": {
"type": "integer"
},
Expand Down Expand Up @@ -13703,6 +13775,9 @@
"description": {
"type": "string"
},
"grafanaUrl": {
"type": "string"
},
"namespace": {
"type": "string"
},
Expand Down Expand Up @@ -14166,6 +14241,29 @@
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatistics": {
"type": "object",
"properties": {
"outofdatePolicyCount": {
"type": "integer"
},
"outofdateTemplateCount": {
"type": "integer"
},
"totalPolicyCount": {
"type": "integer"
},
"totalTemplateCount": {
"type": "integer"
},
"uptodatePolicyCount": {
"type": "integer"
},
"uptodateTemplateCount": {
"type": "integer"
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.StackPolicyStatusResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -14576,6 +14674,9 @@
"name": {
"type": "string"
},
"notificationType": {
"type": "string"
},
"systemNotificationCondition": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.SystemNotificationConditionResponse"
},
Expand Down Expand Up @@ -14629,6 +14730,9 @@
"name": {
"type": "string"
},
"notificationType": {
"type": "string"
},
"organizations": {
"type": "array",
"items": {
Expand Down
Loading

0 comments on commit 84df1ec

Please sign in to comment.