Documentation
¶
Index ¶
- type Context
- func (ctx *Context) AddJSON(dataRaw []byte) error
- func (ctx *Context) AddRequest(request *v1beta1.AdmissionRequest) error
- func (ctx *Context) AddResource(dataRaw []byte) error
- func (ctx *Context) AddSA(userName string) error
- func (ctx *Context) AddUserInfo(userRequestInfo kyverno.RequestInfo) error
- func (ctx *Context) Query(query string) (interface{}, error)
- type EvalInterface
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context stores the data resources as JSON
func NewContext ¶
NewContext returns a new context builtInVars is the list of known variables (e.g. serviceAccountName)
func (*Context) AddRequest ¶ added in v1.2.0
func (ctx *Context) AddRequest(request *v1beta1.AdmissionRequest) error
AddRequest addes an admission request to context
func (*Context) AddResource ¶
AddResource data at path: request.object
func (*Context) AddSA ¶
AddSA removes prefix 'system:serviceaccount:' and namespace, then loads only SA name and SA namespace
func (*Context) AddUserInfo ¶
func (ctx *Context) AddUserInfo(userRequestInfo kyverno.RequestInfo) error
AddUserInfo adds userInfo at path request.userInfo
type EvalInterface ¶
EvalInterface ... to evaluate
type Interface ¶
type Interface interface { //AddJSON merges the json with context AddJSON(dataRaw []byte) error //AddResource merges resource json under request.object AddResource(dataRaw []byte) error //AddUserInfo merges userInfo json under kyverno.userInfo AddUserInfo(userInfo kyverno.UserInfo) error //AddSA merges serrviceaccount AddSA(userName string) error EvalInterface }
Interface to manage context operations
Click to show internal directories.
Click to hide internal directories.