Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

정책의 Match절을 Raw Yaml로 설정하는 기능 추가 #325

Merged
merged 2 commits into from
Apr 2, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 60 additions & 26 deletions api/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10194,23 +10194,22 @@ const docTemplate = `{
"type": "string"
},
"enforcementAction": {
"type": "string"
"type": "string",
"example": "deny"
},
"mandatory": {
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string",
"example": "namespaces:\r\n- testns1"
},
"parameters": {
"type": "string",
"example": "\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\""
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down Expand Up @@ -11734,6 +11733,23 @@ const docTemplate = `{
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.Kinds": {
"type": "object",
"properties": {
"apiGroups": {
"type": "array",
"items": {
"type": "string"
}
},
"kinds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.ListClusterPolicyStatusResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -11974,6 +11990,29 @@ const docTemplate = `{
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.Match": {
"type": "object",
"properties": {
"excludedNamespaces": {
"type": "array",
"items": {
"type": "string"
}
},
"kinds": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Kinds"
}
},
"namespaces": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.MergePermissionResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12167,7 +12206,8 @@ const docTemplate = `{
"type": "string"
},
"enforcementAction": {
"type": "string"
"type": "string",
"example": "deny"
},
"filledParameters": {
"type": "array",
Expand All @@ -12183,17 +12223,14 @@ const docTemplate = `{
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string"
},
"parameters": {
"type": "string",
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\"}"
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down Expand Up @@ -13725,17 +13762,14 @@ const docTemplate = `{
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string"
},
"parameters": {
"type": "string",
"example": "\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\""
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down
86 changes: 60 additions & 26 deletions api/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10188,23 +10188,22 @@
"type": "string"
},
"enforcementAction": {
"type": "string"
"type": "string",
"example": "deny"
},
"mandatory": {
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string",
"example": "namespaces:\r\n- testns1"
},
"parameters": {
"type": "string",
"example": "\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\""
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down Expand Up @@ -11728,6 +11727,23 @@
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.Kinds": {
"type": "object",
"properties": {
"apiGroups": {
"type": "array",
"items": {
"type": "string"
}
},
"kinds": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.ListClusterPolicyStatusResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -11968,6 +11984,29 @@
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.Match": {
"type": "object",
"properties": {
"excludedNamespaces": {
"type": "array",
"items": {
"type": "string"
}
},
"kinds": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Kinds"
}
},
"namespaces": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"github_com_openinfradev_tks-api_pkg_domain.MergePermissionResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12161,7 +12200,8 @@
"type": "string"
},
"enforcementAction": {
"type": "string"
"type": "string",
"example": "deny"
},
"filledParameters": {
"type": "array",
Expand All @@ -12177,17 +12217,14 @@
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string"
},
"parameters": {
"type": "string",
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\"}"
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down Expand Up @@ -13719,17 +13756,14 @@
"type": "boolean"
},
"match": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"refer": "match.Match"
}
"$ref": "#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match"
},
"matchYaml": {
"type": "string"
},
"parameters": {
"type": "string",
"example": "\"labels\":{\"key\":\"owner\",\"allowedRegex:^[a-zA-Z]+.agilebank.demo$}\""
"example": "{\"labels\":{\"key\":\"owner\",\"allowedRegex\":\"test*\"}"
},
"policyName": {
"type": "string",
Expand Down
59 changes: 41 additions & 18 deletions api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -885,17 +885,17 @@ definitions:
description:
type: string
enforcementAction:
example: deny
type: string
mandatory:
type: boolean
match:
additionalProperties:
type: string
example:
refer: match.Match
type: object
$ref: '#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match'
matchYaml:
example: "namespaces:\r\n- testns1"
type: string
parameters:
example: '"labels":{"key":"owner","allowedRegex:^[a-zA-Z]+.agilebank.demo$}"'
example: '{"labels":{"key":"owner","allowedRegex":"test*"}'
type: string
policyName:
example: label 정책
Expand Down Expand Up @@ -1905,6 +1905,17 @@ definitions:
id:
type: string
type: object
github_com_openinfradev_tks-api_pkg_domain.Kinds:
properties:
apiGroups:
items:
type: string
type: array
kinds:
items:
type: string
type: array
type: object
github_com_openinfradev_tks-api_pkg_domain.ListClusterPolicyStatusResponse:
properties:
polices:
Expand Down Expand Up @@ -2064,6 +2075,21 @@ definitions:
example: 레이블 요구
type: string
type: object
github_com_openinfradev_tks-api_pkg_domain.Match:
properties:
excludedNamespaces:
items:
type: string
type: array
kinds:
items:
$ref: '#/definitions/github_com_openinfradev_tks-api_pkg_domain.Kinds'
type: array
namespaces:
items:
type: string
type: array
type: object
github_com_openinfradev_tks-api_pkg_domain.MergePermissionResponse:
properties:
children:
Expand Down Expand Up @@ -2191,6 +2217,7 @@ definitions:
description:
type: string
enforcementAction:
example: deny
type: string
filledParameters:
items:
Expand All @@ -2202,13 +2229,11 @@ definitions:
mandatory:
type: boolean
match:
additionalProperties:
type: string
example:
refer: match.Match
type: object
$ref: '#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match'
matchYaml:
type: string
parameters:
example: '{"labels":{"key":"owner","allowedRegex:^[a-zA-Z]+.agilebank.demo$}"}'
example: '{"labels":{"key":"owner","allowedRegex":"test*"}'
type: string
policyName:
example: label 정책
Expand Down Expand Up @@ -3231,13 +3256,11 @@ definitions:
mandatory:
type: boolean
match:
additionalProperties:
type: string
example:
refer: match.Match
type: object
$ref: '#/definitions/github_com_openinfradev_tks-api_pkg_domain.Match'
matchYaml:
type: string
parameters:
example: '"labels":{"key":"owner","allowedRegex:^[a-zA-Z]+.agilebank.demo$}"'
example: '{"labels":{"key":"owner","allowedRegex":"test*"}'
type: string
policyName:
example: label 정책
Expand Down
Loading
Loading