support customize notification receiver
Signed-off-by: wanjunlei <wanjunlei@yunify.com>
This commit is contained in:
@@ -37,6 +37,7 @@ import (
|
||||
"kubesphere.io/kubesphere/pkg/controller/network/ippool"
|
||||
"kubesphere.io/kubesphere/pkg/controller/network/nsnetworkpolicy"
|
||||
"kubesphere.io/kubesphere/pkg/controller/network/nsnetworkpolicy/provider"
|
||||
"kubesphere.io/kubesphere/pkg/controller/notification"
|
||||
"kubesphere.io/kubesphere/pkg/controller/pipeline"
|
||||
"kubesphere.io/kubesphere/pkg/controller/s2ibinary"
|
||||
"kubesphere.io/kubesphere/pkg/controller/s2irun"
|
||||
@@ -284,6 +285,11 @@ func addControllers(
|
||||
|
||||
if multiClusterEnabled {
|
||||
controllers["globalrole-controller"] = globalRoleController
|
||||
notificationController, err := notification.NewController(client.Kubernetes(), mgr.GetClient(), mgr.GetCache())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
controllers["notification-controller"] = notificationController
|
||||
}
|
||||
|
||||
for name, ctrl := range controllers {
|
||||
|
||||
83
config/crds/notification.kubesphere.io_dingtalkconfigs.yaml
generated
Normal file
83
config/crds/notification.kubesphere.io_dingtalkconfigs.yaml
generated
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: dingtalkconfigs.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: DingTalkConfig
|
||||
listKind: DingTalkConfigList
|
||||
plural: dingtalkconfigs
|
||||
shortNames:
|
||||
- dc
|
||||
singular: dingtalkconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: DingTalkConfig is the Schema for the dingtalkconfigs API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DingTalkConfigSpec defines the desired state of DingTalkConfig
|
||||
properties:
|
||||
conversation:
|
||||
description: Only needed when send alerts to the conversation.
|
||||
properties:
|
||||
appkey:
|
||||
description: The key of the application with which to send messages.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
appsecret:
|
||||
description: The key in the secret to be used. Must be a valid secret key.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: DingTalkConfigStatus defines the observed state of DingTalkConfig
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
158
config/crds/notification.kubesphere.io_dingtalkreceivers.yaml
generated
Normal file
158
config/crds/notification.kubesphere.io_dingtalkreceivers.yaml
generated
Normal file
@@ -0,0 +1,158 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: dingtalkreceivers.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: DingTalkReceiver
|
||||
listKind: DingTalkReceiverList
|
||||
plural: dingtalkreceivers
|
||||
shortNames:
|
||||
- dr
|
||||
singular: dingtalkreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: DingTalkReceiver is the Schema for the dingtalkreceivers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: DingTalkReceiverSpec defines the desired state of DingTalkReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
chatbot:
|
||||
description: Be careful, a ChatBot only can send 20 message per minute.
|
||||
properties:
|
||||
keywords:
|
||||
description: Custom keywords of ChatBot
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
secret:
|
||||
description: Secret of ChatBot, you can get it after enabled Additional Signature of ChatBot.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
webhook:
|
||||
description: The webhook of ChatBot which the message will send to.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
required:
|
||||
- webhook
|
||||
type: object
|
||||
conversation:
|
||||
description: The conversation which message will send to.
|
||||
properties:
|
||||
chatid:
|
||||
type: string
|
||||
required:
|
||||
- chatid
|
||||
type: object
|
||||
dingtalkConfigSelector:
|
||||
description: DingTalkConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: DingTalkReceiverStatus defines the observed state of DingTalkReceiver
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
167
config/crds/notification.kubesphere.io_emailconfigs.yaml
generated
Normal file
167
config/crds/notification.kubesphere.io_emailconfigs.yaml
generated
Normal file
@@ -0,0 +1,167 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: emailconfigs.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: EmailConfig
|
||||
listKind: EmailConfigList
|
||||
plural: emailconfigs
|
||||
shortNames:
|
||||
- ec
|
||||
singular: emailconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: EmailConfig is the Schema for the emailconfigs API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: EmailConfigSpec defines the desired state of EmailConfig
|
||||
properties:
|
||||
authIdentify:
|
||||
description: The identity for PLAIN authentication.
|
||||
type: string
|
||||
authPassword:
|
||||
description: The secret contains the SMTP password for LOGIN and PLAIN authentications.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
authSecret:
|
||||
description: The secret contains the SMTP secret for CRAM-MD5 authentication.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
authUsername:
|
||||
description: The username for CRAM-MD5, LOGIN and PLAIN authentications.
|
||||
type: string
|
||||
from:
|
||||
description: The sender address.
|
||||
type: string
|
||||
hello:
|
||||
description: The hostname to use when identifying to the SMTP server.
|
||||
type: string
|
||||
requireTLS:
|
||||
description: The default SMTP TLS requirement.
|
||||
type: boolean
|
||||
smartHost:
|
||||
description: The address of the SMTP server.
|
||||
properties:
|
||||
host:
|
||||
type: string
|
||||
port:
|
||||
type: string
|
||||
required:
|
||||
- host
|
||||
- port
|
||||
type: object
|
||||
tls:
|
||||
description: TLSConfig configures the options for TLS connections.
|
||||
properties:
|
||||
clientCertificate:
|
||||
description: The certificate of the client.
|
||||
properties:
|
||||
cert:
|
||||
description: The client cert file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
key:
|
||||
description: The client key file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
insecureSkipVerify:
|
||||
description: Disable target certificate validation.
|
||||
type: boolean
|
||||
rootCA:
|
||||
description: RootCA defines the root certificate authorities that clients use when verifying server certificates.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
serverName:
|
||||
description: Used to verify the hostname for the targets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- from
|
||||
- smartHost
|
||||
type: object
|
||||
status:
|
||||
description: EmailConfigStatus defines the observed state of EmailConfig
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
116
config/crds/notification.kubesphere.io_emailreceivers.yaml
generated
Normal file
116
config/crds/notification.kubesphere.io_emailreceivers.yaml
generated
Normal file
@@ -0,0 +1,116 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: emailreceivers.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: EmailReceiver
|
||||
listKind: EmailReceiverList
|
||||
plural: emailreceivers
|
||||
shortNames:
|
||||
- er
|
||||
singular: emailreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: EmailReceiver is the Schema for the emailreceivers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: EmailReceiverSpec defines the desired state of EmailReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
emailConfigSelector:
|
||||
description: EmailConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
to:
|
||||
description: Receivers' email addresses
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- to
|
||||
type: object
|
||||
status:
|
||||
description: EmailReceiverStatus defines the observed state of EmailReceiver
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
1519
config/crds/notification.kubesphere.io_notificationmanagers.yaml
generated
Normal file
1519
config/crds/notification.kubesphere.io_notificationmanagers.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
64
config/crds/notification.kubesphere.io_slackconfigs.yaml
generated
Normal file
64
config/crds/notification.kubesphere.io_slackconfigs.yaml
generated
Normal file
@@ -0,0 +1,64 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: slackconfigs.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: SlackConfig
|
||||
listKind: SlackConfigList
|
||||
plural: slackconfigs
|
||||
shortNames:
|
||||
- sc
|
||||
singular: slackconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: SlackConfig is the Schema for the slackconfigs API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: SlackConfigSpec defines the desired state of SlackConfig
|
||||
properties:
|
||||
slackTokenSecret:
|
||||
description: The token of user or bot.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: SlackConfigStatus defines the observed state of SlackConfig
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
114
config/crds/notification.kubesphere.io_slackreceivers.yaml
generated
Normal file
114
config/crds/notification.kubesphere.io_slackreceivers.yaml
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: slackreceivers.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: SlackReceiver
|
||||
listKind: SlackReceiverList
|
||||
plural: slackreceivers
|
||||
shortNames:
|
||||
- sr
|
||||
singular: slackreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: SlackReceiver is the Schema for the slackreceivers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: SlackReceiverSpec defines the desired state of SlackReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
channel:
|
||||
description: The channel or user to send notifications to.
|
||||
type: string
|
||||
slackConfigSelector:
|
||||
description: SlackConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- channel
|
||||
type: object
|
||||
status:
|
||||
description: SlackReceiverStatus defines the observed state of SlackReceiver
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
48
config/crds/notification.kubesphere.io_webhookconfigs.yaml
generated
Normal file
48
config/crds/notification.kubesphere.io_webhookconfigs.yaml
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: webhookconfigs.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: WebhookConfig
|
||||
listKind: WebhookConfigList
|
||||
plural: webhookconfigs
|
||||
shortNames:
|
||||
- wc
|
||||
singular: webhookconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: WebhookConfig is the Schema for the webhookconfigs API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: WebhookConfigSpec defines the desired state of WebhookConfig
|
||||
type: object
|
||||
status:
|
||||
description: WebhookConfigStatus defines the observed state of WebhookConfig
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
239
config/crds/notification.kubesphere.io_webhookreceivers.yaml
generated
Normal file
239
config/crds/notification.kubesphere.io_webhookreceivers.yaml
generated
Normal file
@@ -0,0 +1,239 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: webhookreceivers.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: WebhookReceiver
|
||||
listKind: WebhookReceiverList
|
||||
plural: webhookreceivers
|
||||
shortNames:
|
||||
- wr
|
||||
singular: webhookreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: WebhookReceiver is the Schema for the webhookreceivers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: WebhookReceiverSpec defines the desired state of WebhookReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
httpConfig:
|
||||
description: HTTPClientConfig configures an HTTP client.
|
||||
properties:
|
||||
basicAuth:
|
||||
description: The HTTP basic authentication credentials for the targets.
|
||||
properties:
|
||||
password:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
username:
|
||||
type: string
|
||||
required:
|
||||
- username
|
||||
type: object
|
||||
bearerToken:
|
||||
description: The bearer token for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
proxyUrl:
|
||||
description: HTTP proxy server to use to connect to the targets.
|
||||
type: string
|
||||
tlsConfig:
|
||||
description: TLSConfig to use to connect to the targets.
|
||||
properties:
|
||||
clientCertificate:
|
||||
description: The certificate of the client.
|
||||
properties:
|
||||
cert:
|
||||
description: The client cert file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
key:
|
||||
description: The client key file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
insecureSkipVerify:
|
||||
description: Disable target certificate validation.
|
||||
type: boolean
|
||||
rootCA:
|
||||
description: RootCA defines the root certificate authorities that clients use when verifying server certificates.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
serverName:
|
||||
description: Used to verify the hostname for the targets.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
service:
|
||||
description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified. \n If the webhook is running within the cluster, then you should use `service`."
|
||||
properties:
|
||||
name:
|
||||
description: '`name` is the name of the service. Required'
|
||||
type: string
|
||||
namespace:
|
||||
description: '`namespace` is the namespace of the service. Required'
|
||||
type: string
|
||||
path:
|
||||
description: '`path` is an optional URL path which will be sent in any request to this service.'
|
||||
type: string
|
||||
port:
|
||||
description: If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
|
||||
format: int32
|
||||
type: integer
|
||||
scheme:
|
||||
description: Http scheme, default is http.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
url:
|
||||
description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. \n The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some api servers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. \n Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. \n A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. \n Attempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either."
|
||||
type: string
|
||||
webhookConfigSelector:
|
||||
description: WebhookConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: WebhookReceiverStatus defines the observed state of WebhookReceiver
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
77
config/crds/notification.kubesphere.io_wechatconfigs.yaml
generated
Normal file
77
config/crds/notification.kubesphere.io_wechatconfigs.yaml
generated
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: wechatconfigs.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: WechatConfig
|
||||
listKind: WechatConfigList
|
||||
plural: wechatconfigs
|
||||
shortNames:
|
||||
- wcc
|
||||
singular: wechatconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: WechatConfig is the Schema for the wechatconfigs API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: WechatConfigSpec defines the desired state of WechatConfig
|
||||
properties:
|
||||
wechatApiAgentId:
|
||||
description: The id of the application which sending message.
|
||||
type: string
|
||||
wechatApiCorpId:
|
||||
description: The corp id for authentication.
|
||||
type: string
|
||||
wechatApiSecret:
|
||||
description: The API key to use when talking to the WeChat API.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
wechatApiUrl:
|
||||
description: The WeChat API URL.
|
||||
type: string
|
||||
required:
|
||||
- wechatApiAgentId
|
||||
- wechatApiCorpId
|
||||
- wechatApiSecret
|
||||
type: object
|
||||
status:
|
||||
description: WechatConfigStatus defines the observed state of WechatConfig
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
115
config/crds/notification.kubesphere.io_wechatreceivers.yaml
generated
Normal file
115
config/crds/notification.kubesphere.io_wechatreceivers.yaml
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: wechatreceivers.notification.kubesphere.io
|
||||
spec:
|
||||
group: notification.kubesphere.io
|
||||
names:
|
||||
kind: WechatReceiver
|
||||
listKind: WechatReceiverList
|
||||
plural: wechatreceivers
|
||||
shortNames:
|
||||
- wcr
|
||||
singular: wechatreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: WechatReceiver is the Schema for the wechatreceivers API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: WechatReceiverSpec defines the desired state of WechatReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
toParty:
|
||||
type: string
|
||||
toTag:
|
||||
type: string
|
||||
toUser:
|
||||
type: string
|
||||
wechatConfigSelector:
|
||||
description: WechatConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: WechatReceiverStatus defines the observed state of WechatReceiver
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
197
config/crds/types.kubefed.io_federateddingtalkconfigs.yaml
generated
Normal file
197
config/crds/types.kubefed.io_federateddingtalkconfigs.yaml
generated
Normal file
@@ -0,0 +1,197 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federateddingtalkconfigs.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedDingTalkConfig
|
||||
listKind: FederatedDingTalkConfigList
|
||||
plural: federateddingtalkconfigs
|
||||
singular: federateddingtalkconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: DingTalkConfigSpec defines the desired state of DingTalkConfig
|
||||
properties:
|
||||
conversation:
|
||||
description: Only needed when send alerts to the conversation.
|
||||
properties:
|
||||
appkey:
|
||||
description: The key of the application with which to send messages.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
appsecret:
|
||||
description: The key in the secret to be used. Must be a valid secret key.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
272
config/crds/types.kubefed.io_federateddingtalkreceivers.yaml
generated
Normal file
272
config/crds/types.kubefed.io_federateddingtalkreceivers.yaml
generated
Normal file
@@ -0,0 +1,272 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federateddingtalkreceivers.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedDingTalkReceiver
|
||||
listKind: FederatedDingTalkReceiverList
|
||||
plural: federateddingtalkreceivers
|
||||
singular: federateddingtalkreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: DingTalkReceiverSpec defines the desired state of DingTalkReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
chatbot:
|
||||
description: Be careful, a ChatBot only can send 20 message per minute.
|
||||
properties:
|
||||
keywords:
|
||||
description: Custom keywords of ChatBot
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
secret:
|
||||
description: Secret of ChatBot, you can get it after enabled Additional Signature of ChatBot.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
webhook:
|
||||
description: The webhook of ChatBot which the message will send to.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
required:
|
||||
- webhook
|
||||
type: object
|
||||
conversation:
|
||||
description: The conversation which message will send to.
|
||||
properties:
|
||||
chatid:
|
||||
type: string
|
||||
required:
|
||||
- chatid
|
||||
type: object
|
||||
dingtalkConfigSelector:
|
||||
description: DingTalkConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
281
config/crds/types.kubefed.io_federatedemailconfigs.yaml
generated
Normal file
281
config/crds/types.kubefed.io_federatedemailconfigs.yaml
generated
Normal file
@@ -0,0 +1,281 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedemailconfigs.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedEmailConfig
|
||||
listKind: FederatedEmailConfigList
|
||||
plural: federatedemailconfigs
|
||||
singular: federatedemailconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: EmailConfigSpec defines the desired state of EmailConfig
|
||||
properties:
|
||||
authIdentify:
|
||||
description: The identity for PLAIN authentication.
|
||||
type: string
|
||||
authPassword:
|
||||
description: The secret contains the SMTP password for LOGIN and PLAIN authentications.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
authSecret:
|
||||
description: The secret contains the SMTP secret for CRAM-MD5 authentication.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
authUsername:
|
||||
description: The username for CRAM-MD5, LOGIN and PLAIN authentications.
|
||||
type: string
|
||||
from:
|
||||
description: The sender address.
|
||||
type: string
|
||||
hello:
|
||||
description: The hostname to use when identifying to the SMTP server.
|
||||
type: string
|
||||
requireTLS:
|
||||
description: The default SMTP TLS requirement.
|
||||
type: boolean
|
||||
smartHost:
|
||||
description: The address of the SMTP server.
|
||||
properties:
|
||||
host:
|
||||
type: string
|
||||
port:
|
||||
type: string
|
||||
required:
|
||||
- host
|
||||
- port
|
||||
type: object
|
||||
tls:
|
||||
description: TLSConfig configures the options for TLS connections.
|
||||
properties:
|
||||
clientCertificate:
|
||||
description: The certificate of the client.
|
||||
properties:
|
||||
cert:
|
||||
description: The client cert file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
key:
|
||||
description: The client key file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
insecureSkipVerify:
|
||||
description: Disable target certificate validation.
|
||||
type: boolean
|
||||
rootCA:
|
||||
description: RootCA defines the root certificate authorities that clients use when verifying server certificates.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
serverName:
|
||||
description: Used to verify the hostname for the targets.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- from
|
||||
- smartHost
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
230
config/crds/types.kubefed.io_federatedemailreceivers.yaml
generated
Normal file
230
config/crds/types.kubefed.io_federatedemailreceivers.yaml
generated
Normal file
@@ -0,0 +1,230 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedemailreceivers.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedEmailReceiver
|
||||
listKind: FederatedEmailReceiverList
|
||||
plural: federatedemailreceivers
|
||||
singular: federatedemailreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: EmailReceiverSpec defines the desired state of EmailReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
emailConfigSelector:
|
||||
description: EmailConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
to:
|
||||
description: Receivers' email addresses
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- to
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
164
config/crds/types.kubefed.io_federatednamespaces.yaml
generated
Normal file
164
config/crds/types.kubefed.io_federatednamespaces.yaml
generated
Normal file
@@ -0,0 +1,164 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatednamespaces.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedNamespace
|
||||
listKind: FederatedNamespaceList
|
||||
plural: federatednamespaces
|
||||
singular: federatednamespace
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
spec:
|
||||
description: NamespaceSpec describes the attributes on a Namespace.
|
||||
properties:
|
||||
finalizers:
|
||||
description: 'Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/'
|
||||
items:
|
||||
description: FinalizerName is the name identifying a finalizer during namespace lifecycle.
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
165
config/crds/types.kubefed.io_federatedsecrets.yaml
generated
Normal file
165
config/crds/types.kubefed.io_federatedsecrets.yaml
generated
Normal file
@@ -0,0 +1,165 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedsecrets.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedSecret
|
||||
listKind: FederatedSecretList
|
||||
plural: federatedsecrets
|
||||
singular: federatedsecret
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
data:
|
||||
additionalProperties:
|
||||
format: byte
|
||||
type: string
|
||||
type: object
|
||||
stringData:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
178
config/crds/types.kubefed.io_federatedslackconfigs.yaml
generated
Normal file
178
config/crds/types.kubefed.io_federatedslackconfigs.yaml
generated
Normal file
@@ -0,0 +1,178 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedslackconfigs.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedSlackConfig
|
||||
listKind: FederatedSlackConfigList
|
||||
plural: federatedslackconfigs
|
||||
singular: federatedslackconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: SlackConfigSpec defines the desired state of SlackConfig
|
||||
properties:
|
||||
slackTokenSecret:
|
||||
description: The token of user or bot.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
228
config/crds/types.kubefed.io_federatedslackreceivers.yaml
generated
Normal file
228
config/crds/types.kubefed.io_federatedslackreceivers.yaml
generated
Normal file
@@ -0,0 +1,228 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedslackreceivers.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedSlackReceiver
|
||||
listKind: FederatedSlackReceiverList
|
||||
plural: federatedslackreceivers
|
||||
singular: federatedslackreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: SlackReceiverSpec defines the desired state of SlackReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
channel:
|
||||
description: The channel or user to send notifications to.
|
||||
type: string
|
||||
slackConfigSelector:
|
||||
description: SlackConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- channel
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
162
config/crds/types.kubefed.io_federatedwebhookconfigs.yaml
generated
Normal file
162
config/crds/types.kubefed.io_federatedwebhookconfigs.yaml
generated
Normal file
@@ -0,0 +1,162 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedwebhookconfigs.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedWebhookConfig
|
||||
listKind: FederatedWebhookConfigList
|
||||
plural: federatedwebhookconfigs
|
||||
singular: federatedwebhookconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: WebhookConfigSpec defines the desired state of WebhookConfig
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
353
config/crds/types.kubefed.io_federatedwebhookreceivers.yaml
generated
Normal file
353
config/crds/types.kubefed.io_federatedwebhookreceivers.yaml
generated
Normal file
@@ -0,0 +1,353 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedwebhookreceivers.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedWebhookReceiver
|
||||
listKind: FederatedWebhookReceiverList
|
||||
plural: federatedwebhookreceivers
|
||||
singular: federatedwebhookreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: WebhookReceiverSpec defines the desired state of WebhookReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
httpConfig:
|
||||
description: HTTPClientConfig configures an HTTP client.
|
||||
properties:
|
||||
basicAuth:
|
||||
description: The HTTP basic authentication credentials for the targets.
|
||||
properties:
|
||||
password:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
username:
|
||||
type: string
|
||||
required:
|
||||
- username
|
||||
type: object
|
||||
bearerToken:
|
||||
description: The bearer token for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
proxyUrl:
|
||||
description: HTTP proxy server to use to connect to the targets.
|
||||
type: string
|
||||
tlsConfig:
|
||||
description: TLSConfig to use to connect to the targets.
|
||||
properties:
|
||||
clientCertificate:
|
||||
description: The certificate of the client.
|
||||
properties:
|
||||
cert:
|
||||
description: The client cert file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
key:
|
||||
description: The client key file for the targets.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
type: object
|
||||
insecureSkipVerify:
|
||||
description: Disable target certificate validation.
|
||||
type: boolean
|
||||
rootCA:
|
||||
description: RootCA defines the root certificate authorities that clients use when verifying server certificates.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
serverName:
|
||||
description: Used to verify the hostname for the targets.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
service:
|
||||
description: "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified. \n If the webhook is running within the cluster, then you should use `service`."
|
||||
properties:
|
||||
name:
|
||||
description: '`name` is the name of the service. Required'
|
||||
type: string
|
||||
namespace:
|
||||
description: '`namespace` is the namespace of the service. Required'
|
||||
type: string
|
||||
path:
|
||||
description: '`path` is an optional URL path which will be sent in any request to this service.'
|
||||
type: string
|
||||
port:
|
||||
description: If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).
|
||||
format: int32
|
||||
type: integer
|
||||
scheme:
|
||||
description: Http scheme, default is http.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
url:
|
||||
description: "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. \n The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some api servers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. \n Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. \n A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. \n Attempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either."
|
||||
type: string
|
||||
webhookConfigSelector:
|
||||
description: WebhookConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
191
config/crds/types.kubefed.io_federatedwechatconfigs.yaml
generated
Normal file
191
config/crds/types.kubefed.io_federatedwechatconfigs.yaml
generated
Normal file
@@ -0,0 +1,191 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedwechatconfigs.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedWechatConfig
|
||||
listKind: FederatedWechatConfigList
|
||||
plural: federatedwechatconfigs
|
||||
singular: federatedwechatconfig
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: WechatConfigSpec defines the desired state of WechatConfig
|
||||
properties:
|
||||
wechatApiAgentId:
|
||||
description: The id of the application which sending message.
|
||||
type: string
|
||||
wechatApiCorpId:
|
||||
description: The corp id for authentication.
|
||||
type: string
|
||||
wechatApiSecret:
|
||||
description: The API key to use when talking to the WeChat API.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: Name of the secret.
|
||||
type: string
|
||||
namespace:
|
||||
description: The namespace of the secret, default to the pod's namespace.
|
||||
type: string
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
wechatApiUrl:
|
||||
description: The WeChat API URL.
|
||||
type: string
|
||||
required:
|
||||
- wechatApiAgentId
|
||||
- wechatApiCorpId
|
||||
- wechatApiSecret
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
229
config/crds/types.kubefed.io_federatedwechatreceivers.yaml
generated
Normal file
229
config/crds/types.kubefed.io_federatedwechatreceivers.yaml
generated
Normal file
@@ -0,0 +1,229 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: federatedwechatreceivers.types.kubefed.io
|
||||
spec:
|
||||
group: types.kubefed.io
|
||||
names:
|
||||
kind: FederatedWechatReceiver
|
||||
listKind: FederatedWechatReceiverList
|
||||
plural: federatedwechatreceivers
|
||||
singular: federatedwechatreceiver
|
||||
scope: Cluster
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
overrides:
|
||||
items:
|
||||
properties:
|
||||
clusterName:
|
||||
type: string
|
||||
clusterOverrides:
|
||||
items:
|
||||
properties:
|
||||
op:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
type: array
|
||||
placement:
|
||||
properties:
|
||||
clusterSelector:
|
||||
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
template:
|
||||
properties:
|
||||
metadata:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
spec:
|
||||
description: WechatReceiverSpec defines the desired state of WechatReceiver
|
||||
properties:
|
||||
alertSelector:
|
||||
description: Selector to filter alerts.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
toParty:
|
||||
type: string
|
||||
toTag:
|
||||
type: string
|
||||
toUser:
|
||||
type: string
|
||||
wechatConfigSelector:
|
||||
description: WechatConfig to be selected for this receiver
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||
items:
|
||||
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- placement
|
||||
- template
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
clusters:
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transit from one status to another.
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: Last time reconciliation resulted in an error or the last time a change was propagated to member clusters.
|
||||
type: string
|
||||
reason:
|
||||
description: (brief) reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of cluster condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
GV="network:v1alpha1 servicemesh:v1alpha2 tenant:v1alpha1 tenant:v1alpha2 devops:v1alpha1 iam:v1alpha2 devops:v1alpha3 cluster:v1alpha1 storage:v1alpha1 auditing:v1alpha1 types:v1beta1 quota:v1alpha2 application:v1alpha1"
|
||||
|
||||
rm -rf ./pkg/client
|
||||
|
||||
25
pkg/apis/addtoscheme_notification_v2.go
Normal file
25
pkg/apis/addtoscheme_notification_v2.go
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Copyright 2019 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package apis
|
||||
|
||||
import (
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
func init() {
|
||||
AddToSchemes = append(AddToSchemes, v2.SchemeBuilder.AddToScheme)
|
||||
}
|
||||
18
pkg/apis/notification/group.go
Normal file
18
pkg/apis/notification/group.go
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package auditing contains auditing API versions
|
||||
package notification
|
||||
65
pkg/apis/notification/v2/dingtalkconfig_types.go
Normal file
65
pkg/apis/notification/v2/dingtalkconfig_types.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Configuration of conversation
|
||||
type DingTalkApplicationConfig struct {
|
||||
// The key of the application with which to send messages.
|
||||
AppKey *SecretKeySelector `json:"appkey,omitempty"`
|
||||
// The key in the secret to be used. Must be a valid secret key.
|
||||
AppSecret *SecretKeySelector `json:"appsecret,omitempty"`
|
||||
}
|
||||
|
||||
// DingTalkConfigSpec defines the desired state of DingTalkConfig
|
||||
type DingTalkConfigSpec struct {
|
||||
// Only needed when send alerts to the conversation.
|
||||
Conversation *DingTalkApplicationConfig `json:"conversation,omitempty"`
|
||||
}
|
||||
|
||||
// DingTalkConfigStatus defines the observed state of DingTalkConfig
|
||||
type DingTalkConfigStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=dc
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// DingTalkConfig is the Schema for the dingtalkconfigs API
|
||||
type DingTalkConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec DingTalkConfigSpec `json:"spec,omitempty"`
|
||||
Status DingTalkConfigStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// DingTalkConfigList contains a list of DingTalkConfig
|
||||
type DingTalkConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []DingTalkConfig `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&DingTalkConfig{}, &DingTalkConfigList{})
|
||||
}
|
||||
80
pkg/apis/notification/v2/dingtalkreceiver_types.go
Normal file
80
pkg/apis/notification/v2/dingtalkreceiver_types.go
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Configuration of ChatBot
|
||||
type DingTalkChatBot struct {
|
||||
// The webhook of ChatBot which the message will send to.
|
||||
Webhook *SecretKeySelector `json:"webhook"`
|
||||
|
||||
// Custom keywords of ChatBot
|
||||
Keywords []string `json:"keywords,omitempty"`
|
||||
|
||||
// Secret of ChatBot, you can get it after enabled Additional Signature of ChatBot.
|
||||
Secret *SecretKeySelector `json:"secret,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration of conversation
|
||||
type DingTalkConversation struct {
|
||||
ChatID string `json:"chatid"`
|
||||
}
|
||||
|
||||
// DingTalkReceiverSpec defines the desired state of DingTalkReceiver
|
||||
type DingTalkReceiverSpec struct {
|
||||
// DingTalkConfig to be selected for this receiver
|
||||
DingTalkConfigSelector *metav1.LabelSelector `json:"dingtalkConfigSelector,omitempty"`
|
||||
// Selector to filter alerts.
|
||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
||||
// Be careful, a ChatBot only can send 20 message per minute.
|
||||
ChatBot *DingTalkChatBot `json:"chatbot,omitempty"`
|
||||
// The conversation which message will send to.
|
||||
Conversation *DingTalkConversation `json:"conversation,omitempty"`
|
||||
}
|
||||
|
||||
// DingTalkReceiverStatus defines the observed state of DingTalkReceiver
|
||||
type DingTalkReceiverStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=dr
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// DingTalkReceiver is the Schema for the dingtalkreceivers API
|
||||
type DingTalkReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec DingTalkReceiverSpec `json:"spec,omitempty"`
|
||||
Status DingTalkReceiverStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// DingTalkReceiverList contains a list of DingTalkReceiver
|
||||
type DingTalkReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []DingTalkReceiver `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&DingTalkReceiver{}, &DingTalkReceiverList{})
|
||||
}
|
||||
21
pkg/apis/notification/v2/doc.go
Normal file
21
pkg/apis/notification/v2/doc.go
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package v1alpha1 contains API Schema definitions for the notification v2 API group
|
||||
// +groupName=notification.kubesphere.io
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
package v2
|
||||
77
pkg/apis/notification/v2/emailconfig_types.go
Normal file
77
pkg/apis/notification/v2/emailconfig_types.go
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// EmailConfigSpec defines the desired state of EmailConfig
|
||||
type EmailConfigSpec struct {
|
||||
// The sender address.
|
||||
From string `json:"from"`
|
||||
// The address of the SMTP server.
|
||||
SmartHost HostPort `json:"smartHost"`
|
||||
// The hostname to use when identifying to the SMTP server.
|
||||
Hello *string `json:"hello,omitempty"`
|
||||
// The username for CRAM-MD5, LOGIN and PLAIN authentications.
|
||||
AuthUsername *string `json:"authUsername,omitempty"`
|
||||
// The identity for PLAIN authentication.
|
||||
AuthIdentify *string `json:"authIdentify,omitempty"`
|
||||
// The secret contains the SMTP password for LOGIN and PLAIN authentications.
|
||||
AuthPassword *SecretKeySelector `json:"authPassword,omitempty"`
|
||||
// The secret contains the SMTP secret for CRAM-MD5 authentication.
|
||||
AuthSecret *SecretKeySelector `json:"authSecret,omitempty"`
|
||||
// The default SMTP TLS requirement.
|
||||
RequireTLS *bool `json:"requireTLS,omitempty"`
|
||||
TLS *TLSConfig `json:"tls,omitempty"`
|
||||
}
|
||||
|
||||
type HostPort struct {
|
||||
Host string `json:"host"`
|
||||
Port string `json:"port"`
|
||||
}
|
||||
|
||||
// EmailConfigStatus defines the observed state of EmailConfig
|
||||
type EmailConfigStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=ec
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// EmailConfig is the Schema for the emailconfigs API
|
||||
type EmailConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EmailConfigSpec `json:"spec,omitempty"`
|
||||
Status EmailConfigStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// EmailConfigList contains a list of EmailConfig
|
||||
type EmailConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []EmailConfig `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&EmailConfig{}, &EmailConfigList{})
|
||||
}
|
||||
61
pkg/apis/notification/v2/emailreceiver_types.go
Normal file
61
pkg/apis/notification/v2/emailreceiver_types.go
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// EmailReceiverSpec defines the desired state of EmailReceiver
|
||||
type EmailReceiverSpec struct {
|
||||
// Receivers' email addresses
|
||||
To []string `json:"to"`
|
||||
// EmailConfig to be selected for this receiver
|
||||
EmailConfigSelector *metav1.LabelSelector `json:"emailConfigSelector,omitempty"`
|
||||
// Selector to filter alerts.
|
||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
||||
}
|
||||
|
||||
// EmailReceiverStatus defines the observed state of EmailReceiver
|
||||
type EmailReceiverStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=er
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// EmailReceiver is the Schema for the emailreceivers API
|
||||
type EmailReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec EmailReceiverSpec `json:"spec,omitempty"`
|
||||
Status EmailReceiverStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// EmailReceiverList contains a list of EmailReceiver
|
||||
type EmailReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []EmailReceiver `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&EmailReceiver{}, &EmailReceiverList{})
|
||||
}
|
||||
210
pkg/apis/notification/v2/notificationmanager_types.go
Normal file
210
pkg/apis/notification/v2/notificationmanager_types.go
Normal file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"time"
|
||||
)
|
||||
|
||||
// SecretKeySelector selects a key of a Secret.
|
||||
type SecretKeySelector struct {
|
||||
// The namespace of the secret, default to the pod's namespace.
|
||||
// +optional
|
||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
|
||||
// Name of the secret.
|
||||
// +optional
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// The key of the secret to select from. Must be a valid secret key.
|
||||
Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
|
||||
}
|
||||
|
||||
// NotificationManagerSpec defines the desired state of NotificationManager
|
||||
type NotificationManagerSpec struct {
|
||||
// Compute Resources required by container.
|
||||
Resources v1.ResourceRequirements `json:"resources,omitempty"`
|
||||
// Docker Image used to start Notification Manager container,
|
||||
// for example kubesphere/notification-manager:v0.1.0
|
||||
Image *string `json:"image,omitempty"`
|
||||
// Image pull policy. One of Always, Never, IfNotPresent.
|
||||
// Defaults to IfNotPresent if not specified
|
||||
ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"`
|
||||
// Number of instances to deploy for Notification Manager deployment.
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
// Define which Nodes the Pods will be scheduled to.
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
// Pod's scheduling constraints.
|
||||
Affinity *v1.Affinity `json:"affinity,omitempty"`
|
||||
// Pod's tolerations.
|
||||
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
|
||||
// ServiceAccountName is the name of the ServiceAccount to use to run Notification Manager Pods.
|
||||
// ServiceAccount 'default' in notification manager's namespace will be used if not specified.
|
||||
ServiceAccountName string `json:"serviceAccountName,omitempty"`
|
||||
// Port name used for the pods and service, defaults to webhook
|
||||
PortName string `json:"portName,omitempty"`
|
||||
// Default Email/Wechat/Slack/Webhook Config to be selected
|
||||
DefaultConfigSelector *metav1.LabelSelector `json:"defaultConfigSelector,omitempty"`
|
||||
// Receivers to send notifications to
|
||||
Receivers *ReceiversSpec `json:"receivers"`
|
||||
// List of volumes that can be mounted by containers belonging to the pod.
|
||||
Volumes []v1.Volume `json:"volumes,omitempty"`
|
||||
// Pod volumes to mount into the container's filesystem.
|
||||
// Cannot be updated.
|
||||
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
|
||||
// Arguments to the entrypoint.
|
||||
// The docker image's CMD is used if this is not provided.
|
||||
// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
|
||||
// cannot be resolved, the reference in the input string will remain unchanged. The $(VAR_NAME) syntax
|
||||
// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
|
||||
// regardless of whether the variable exists or not.
|
||||
// Cannot be updated.
|
||||
// +optional
|
||||
Args []string `json:"args,omitempty"`
|
||||
}
|
||||
|
||||
type ReceiversSpec struct {
|
||||
// Key used to identify tenant, default to be "namespace" if not specified
|
||||
TenantKey string `json:"tenantKey"`
|
||||
// Selector to find global notification receivers
|
||||
// which will be used when tenant receivers cannot be found.
|
||||
// Only matchLabels expression is allowed.
|
||||
GlobalReceiverSelector *metav1.LabelSelector `json:"globalReceiverSelector"`
|
||||
// Selector to find tenant notification receivers.
|
||||
// Only matchLabels expression is allowed.
|
||||
TenantReceiverSelector *metav1.LabelSelector `json:"tenantReceiverSelector"`
|
||||
// Various receiver options
|
||||
Options *Options `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type GlobalOptions struct {
|
||||
// Template file path, must be a absolute path.
|
||||
TemplateFiles []string `json:"templateFile,omitempty"`
|
||||
// The name of the template to generate message.
|
||||
// If the receiver dose not setup template, it will use this.
|
||||
Template string `json:"template,omitempty"`
|
||||
// The name of the cluster in which the notification manager is deployed.
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
}
|
||||
|
||||
type EmailOptions struct {
|
||||
// Notification Sending Timeout
|
||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
||||
// Type of sending email, bulk or single
|
||||
DeliveryType string `json:"deliveryType,omitempty"`
|
||||
// The maximum size of receivers in one email.
|
||||
MaxEmailReceivers int `json:"maxEmailReceivers,omitempty"`
|
||||
// The name of the template to generate email message.
|
||||
// If the global template is not set, it will use default.
|
||||
Template string `json:"template,omitempty"`
|
||||
// The name of the template to generate email subject
|
||||
SubjectTemplate string `json:"subjectTemplate,omitempty"`
|
||||
}
|
||||
|
||||
type WechatOptions struct {
|
||||
// Notification Sending Timeout
|
||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
||||
// The name of the template to generate wechat message.
|
||||
Template string `json:"template,omitempty"`
|
||||
// The maximum message size that can be sent in a request.
|
||||
MessageMaxSize int `json:"messageMaxSize,omitempty"`
|
||||
// The time of token expired.
|
||||
TokenExpires time.Duration `json:"tokenExpires,omitempty"`
|
||||
}
|
||||
|
||||
type SlackOptions struct {
|
||||
// Notification Sending Timeout
|
||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
||||
// The name of the template to generate slack message.
|
||||
// If the global template is not set, it will use default.
|
||||
Template string `json:"template,omitempty"`
|
||||
}
|
||||
|
||||
type WebhookOptions struct {
|
||||
// Notification Sending Timeout
|
||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
||||
// The name of the template to generate webhook message.
|
||||
// If the global template is not set, it will use default.
|
||||
Template string `json:"template,omitempty"`
|
||||
}
|
||||
|
||||
// The config of flow control.
|
||||
type Throttle struct {
|
||||
// The maximum calls in `Unit`.
|
||||
Threshold int `json:"threshold,omitempty"`
|
||||
Unit time.Duration `json:"unit,omitempty"`
|
||||
// The maximum tolerable waiting time when the calls trigger flow control, if the actual waiting time is more than this time, it will
|
||||
// return a error, else it will wait for the flow restriction lifted, and send the message.
|
||||
// Nil means do not wait, the maximum value is `Unit`.
|
||||
MaxWaitTime time.Duration `json:"maxWaitTime,omitempty"`
|
||||
}
|
||||
|
||||
type DingTalkOptions struct {
|
||||
// Notification Sending Timeout
|
||||
NotificationTimeout *int32 `json:"notificationTimeout,omitempty"`
|
||||
// The name of the template to generate DingTalk message.
|
||||
// If the global template is not set, it will use default.
|
||||
Template string `json:"template,omitempty"`
|
||||
// The time of token expired.
|
||||
TokenExpires time.Duration `json:"tokenExpires,omitempty"`
|
||||
// The maximum message size that can be sent to conversation in a request.
|
||||
ConversationMessageMaxSize int `json:"conversationMessageMaxSize,omitempty"`
|
||||
// The maximum message size that can be sent to chatbot in a request.
|
||||
ChatbotMessageMaxSize int `json:"chatbotMessageMaxSize,omitempty"`
|
||||
// The flow control fo chatbot.
|
||||
ChatBotThrottle *Throttle `json:"chatBotThrottle,omitempty"`
|
||||
// The flow control fo conversation.
|
||||
ConversationThrottle *Throttle `json:"conversationThrottle,omitempty"`
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
Global *GlobalOptions `json:"global,omitempty"`
|
||||
Email *EmailOptions `json:"email,omitempty"`
|
||||
Wechat *WechatOptions `json:"wechat,omitempty"`
|
||||
Slack *SlackOptions `json:"slack,omitempty"`
|
||||
Webhook *WebhookOptions `json:"webhook,omitempty"`
|
||||
DingTalk *DingTalkOptions `json:"dingtalk,omitempty"`
|
||||
}
|
||||
|
||||
// NotificationManagerStatus defines the observed state of NotificationManager
|
||||
type NotificationManagerStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=nm
|
||||
|
||||
// NotificationManager is the Schema for the notificationmanagers API
|
||||
type NotificationManager struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec NotificationManagerSpec `json:"spec,omitempty"`
|
||||
Status NotificationManagerStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// NotificationManagerList contains a list of NotificationManager
|
||||
type NotificationManagerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []NotificationManager `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&NotificationManager{}, &NotificationManagerList{})
|
||||
}
|
||||
41
pkg/apis/notification/v2/register.go
Normal file
41
pkg/apis/notification/v2/register.go
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// NOTE: Boilerplate only. Ignore this file.
|
||||
|
||||
// Package v1alpha1 contains API Schema definitions for the notification v2 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +groupName=notification.kubesphere.io
|
||||
package v2
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"sigs.k8s.io/controller-runtime/pkg/runtime/scheme"
|
||||
)
|
||||
|
||||
var (
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
SchemeGroupVersion = schema.GroupVersion{Group: "notification.kubesphere.io", Version: "v2"}
|
||||
|
||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
||||
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
57
pkg/apis/notification/v2/slackconfig_types.go
Normal file
57
pkg/apis/notification/v2/slackconfig_types.go
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// SlackConfigSpec defines the desired state of SlackConfig
|
||||
type SlackConfigSpec struct {
|
||||
// The token of user or bot.
|
||||
SlackTokenSecret *SecretKeySelector `json:"slackTokenSecret,omitempty"`
|
||||
}
|
||||
|
||||
// SlackConfigStatus defines the observed state of SlackConfig
|
||||
type SlackConfigStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=sc
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// SlackConfig is the Schema for the slackconfigs API
|
||||
type SlackConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec SlackConfigSpec `json:"spec,omitempty"`
|
||||
Status SlackConfigStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// SlackConfigList contains a list of SlackConfig
|
||||
type SlackConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []SlackConfig `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&SlackConfig{}, &SlackConfigList{})
|
||||
}
|
||||
61
pkg/apis/notification/v2/slackreceiver_types.go
Normal file
61
pkg/apis/notification/v2/slackreceiver_types.go
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// SlackReceiverSpec defines the desired state of SlackReceiver
|
||||
type SlackReceiverSpec struct {
|
||||
// SlackConfig to be selected for this receiver
|
||||
SlackConfigSelector *metav1.LabelSelector `json:"slackConfigSelector,omitempty"`
|
||||
// Selector to filter alerts.
|
||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
||||
// The channel or user to send notifications to.
|
||||
Channel string `json:"channel"`
|
||||
}
|
||||
|
||||
// SlackReceiverStatus defines the observed state of SlackReceiver
|
||||
type SlackReceiverStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=sr
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// SlackReceiver is the Schema for the slackreceivers API
|
||||
type SlackReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec SlackReceiverSpec `json:"spec,omitempty"`
|
||||
Status SlackReceiverStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// SlackReceiverList contains a list of SlackReceiver
|
||||
type SlackReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []SlackReceiver `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&SlackReceiver{}, &SlackReceiverList{})
|
||||
}
|
||||
41
pkg/apis/notification/v2/types.go
Normal file
41
pkg/apis/notification/v2/types.go
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
const (
|
||||
ResourcesPluralDingTalkConfig = "dingtalkconfigs"
|
||||
ResourcesPluralDingTalkReceiver = "dingtalkreceivers"
|
||||
ResourcesPluralEmailConfig = "emailconfigs"
|
||||
ResourcesPluralEmailReceiver = "emailreceivers"
|
||||
ResourcesPluralSlackConfig = "slackconfigs"
|
||||
ResourcesPluralSlackReceiver = "slackreceivers"
|
||||
ResourcesPluralWebhookConfig = "webhookconfigs"
|
||||
ResourcesPluralWebhookReceiver = "webhookreceivers"
|
||||
ResourcesPluralWechatConfig = "wechatconfigs"
|
||||
ResourcesPluralWechatReceiver = "wechatreceivers"
|
||||
|
||||
ResourcesSingularDingTalkConfig = "dingtalkconfig"
|
||||
ResourcesSingularDingTalkReceiver = "dingtalkreceiver"
|
||||
ResourcesSingularEmailConfig = "emailconfig"
|
||||
ResourcesSingularEmailReceiver = "emailreceiver"
|
||||
ResourcesSingularSlackConfig = "slackconfig"
|
||||
ResourcesSingularSlackReceiver = "slackreceiver"
|
||||
ResourcesSingularWebhookConfig = "webhookconfig"
|
||||
ResourcesSingularWebhookReceiver = "webhookreceiver"
|
||||
ResourcesSingularWechatConfig = "wechatconfig"
|
||||
ResourcesSingularWechatReceiver = "wechatreceiver"
|
||||
)
|
||||
54
pkg/apis/notification/v2/v2_suite_test.go
Normal file
54
pkg/apis/notification/v2/v2_suite_test.go
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/envtest"
|
||||
)
|
||||
|
||||
var cfg *rest.Config
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
t := &envtest.Environment{
|
||||
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "..", "config", "crds")},
|
||||
}
|
||||
|
||||
err := SchemeBuilder.AddToScheme(scheme.Scheme)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if cfg, err = t.Start(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
code := m.Run()
|
||||
_ = t.Stop()
|
||||
os.Exit(code)
|
||||
}
|
||||
55
pkg/apis/notification/v2/webhookconfig_types.go
Normal file
55
pkg/apis/notification/v2/webhookconfig_types.go
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// WebhookConfigSpec defines the desired state of WebhookConfig
|
||||
type WebhookConfigSpec struct {
|
||||
}
|
||||
|
||||
// WebhookConfigStatus defines the observed state of WebhookConfig
|
||||
type WebhookConfigStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=wc
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// WebhookConfig is the Schema for the webhookconfigs API
|
||||
type WebhookConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WebhookConfigSpec `json:"spec,omitempty"`
|
||||
Status WebhookConfigStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WebhookConfigList contains a list of WebhookConfig
|
||||
type WebhookConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []WebhookConfig `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&WebhookConfig{}, &WebhookConfigList{})
|
||||
}
|
||||
159
pkg/apis/notification/v2/webhookreceiver_types.go
Normal file
159
pkg/apis/notification/v2/webhookreceiver_types.go
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type ClientCertificate struct {
|
||||
// The client cert file for the targets.
|
||||
Cert *SecretKeySelector `json:"cert,omitempty"`
|
||||
// The client key file for the targets.
|
||||
Key *SecretKeySelector `json:"key,omitempty"`
|
||||
}
|
||||
|
||||
// TLSConfig configures the options for TLS connections.
|
||||
type TLSConfig struct {
|
||||
// RootCA defines the root certificate authorities
|
||||
// that clients use when verifying server certificates.
|
||||
RootCA *SecretKeySelector `json:"rootCA,omitempty"`
|
||||
// The certificate of the client.
|
||||
*ClientCertificate `json:"clientCertificate,omitempty"`
|
||||
// Used to verify the hostname for the targets.
|
||||
ServerName string `json:"serverName,omitempty"`
|
||||
// Disable target certificate validation.
|
||||
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
|
||||
}
|
||||
|
||||
// BasicAuth contains basic HTTP authentication credentials.
|
||||
type BasicAuth struct {
|
||||
Username string `json:"username"`
|
||||
Password *SecretKeySelector `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPClientConfig configures an HTTP client.
|
||||
type HTTPClientConfig struct {
|
||||
// The HTTP basic authentication credentials for the targets.
|
||||
BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
|
||||
// The bearer token for the targets.
|
||||
BearerToken *SecretKeySelector `json:"bearerToken,omitempty"`
|
||||
// HTTP proxy server to use to connect to the targets.
|
||||
ProxyURL string `json:"proxyUrl,omitempty"`
|
||||
// TLSConfig to use to connect to the targets.
|
||||
TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
type ServiceReference struct {
|
||||
// `namespace` is the namespace of the service.
|
||||
// Required
|
||||
Namespace string `json:"namespace"`
|
||||
|
||||
// `name` is the name of the service.
|
||||
// Required
|
||||
Name string `json:"name"`
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// +optional
|
||||
Path *string `json:"path,omitempty"`
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// +optional
|
||||
Port *int32 `json:"port,omitempty"`
|
||||
|
||||
// Http scheme, default is http.
|
||||
// +optional
|
||||
Scheme *string `json:"scheme,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookReceiverSpec defines the desired state of WebhookReceiver
|
||||
type WebhookReceiverSpec struct {
|
||||
// WebhookConfig to be selected for this receiver
|
||||
WebhookConfigSelector *metav1.LabelSelector `json:"webhookConfigSelector,omitempty"`
|
||||
// Selector to filter alerts.
|
||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
// The `host` should not refer to a service running in the cluster; use
|
||||
// the `service` field instead. The host might be resolved via external
|
||||
// DNS in some api servers (e.g., `kube-apiserver` cannot resolve
|
||||
// in-cluster DNS as that would be a layering violation). `host` may
|
||||
// also be an IP address.
|
||||
//
|
||||
// Please note that using `localhost` or `127.0.0.1` as a `host` is
|
||||
// risky unless you take great care to run this webhook on all hosts
|
||||
// which run an apiserver which might need to make calls to this
|
||||
// webhook. Such installs are likely to be non-portable, i.e., not easy
|
||||
// to turn up in a new cluster.
|
||||
//
|
||||
// A path is optional, and if present may be any string permissible in
|
||||
// a URL. You may use the path to pass an arbitrary string to the
|
||||
// webhook, for example, a cluster identifier.
|
||||
//
|
||||
// Attempting to use a user or basic auth e.g. "user:password@" is not
|
||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
||||
// allowed, either.
|
||||
//
|
||||
// +optional
|
||||
URL *string `json:"url,omitempty"`
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
Service *ServiceReference `json:"service,omitempty"`
|
||||
|
||||
HTTPConfig *HTTPClientConfig `json:"httpConfig,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookReceiverStatus defines the observed state of WebhookReceiver
|
||||
type WebhookReceiverStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=wr
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// WebhookReceiver is the Schema for the webhookreceivers API
|
||||
type WebhookReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WebhookReceiverSpec `json:"spec,omitempty"`
|
||||
Status WebhookReceiverStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WebhookReceiverList contains a list of WebhookReceiver
|
||||
type WebhookReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []WebhookReceiver `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&WebhookReceiver{}, &WebhookReceiverList{})
|
||||
}
|
||||
63
pkg/apis/notification/v2/wechatconfig_types.go
Normal file
63
pkg/apis/notification/v2/wechatconfig_types.go
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// WechatConfigSpec defines the desired state of WechatConfig
|
||||
type WechatConfigSpec struct {
|
||||
// The WeChat API URL.
|
||||
WechatApiUrl string `json:"wechatApiUrl,omitempty"`
|
||||
// The corp id for authentication.
|
||||
WechatApiCorpId string `json:"wechatApiCorpId"`
|
||||
// The id of the application which sending message.
|
||||
WechatApiAgentId string `json:"wechatApiAgentId"`
|
||||
// The API key to use when talking to the WeChat API.
|
||||
WechatApiSecret *SecretKeySelector `json:"wechatApiSecret"`
|
||||
}
|
||||
|
||||
// WechatConfigStatus defines the observed state of WechatConfig
|
||||
type WechatConfigStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=wcc
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// WechatConfig is the Schema for the wechatconfigs API
|
||||
type WechatConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WechatConfigSpec `json:"spec,omitempty"`
|
||||
Status WechatConfigStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WechatConfigList contains a list of WechatConfig
|
||||
type WechatConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []WechatConfig `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&WechatConfig{}, &WechatConfigList{})
|
||||
}
|
||||
63
pkg/apis/notification/v2/wechatreceiver_types.go
Normal file
63
pkg/apis/notification/v2/wechatreceiver_types.go
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// WechatReceiverSpec defines the desired state of WechatReceiver
|
||||
type WechatReceiverSpec struct {
|
||||
// WechatConfig to be selected for this receiver
|
||||
WechatConfigSelector *metav1.LabelSelector `json:"wechatConfigSelector,omitempty"`
|
||||
// Selector to filter alerts.
|
||||
AlertSelector *metav1.LabelSelector `json:"alertSelector,omitempty"`
|
||||
// +optional
|
||||
ToUser string `json:"toUser,omitempty"`
|
||||
ToParty string `json:"toParty,omitempty"`
|
||||
ToTag string `json:"toTag,omitempty"`
|
||||
}
|
||||
|
||||
// WechatReceiverStatus defines the observed state of WechatReceiver
|
||||
type WechatReceiverStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:scope=Cluster,shortName=wcr
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// WechatReceiver is the Schema for the wechatreceivers API
|
||||
type WechatReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WechatReceiverSpec `json:"spec,omitempty"`
|
||||
Status WechatReceiverStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WechatReceiverList contains a list of WechatReceiver
|
||||
type WechatReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []WechatReceiver `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&WechatReceiver{}, &WechatReceiverList{})
|
||||
}
|
||||
1651
pkg/apis/notification/v2/zz_generated.deepcopy.go
generated
Normal file
1651
pkg/apis/notification/v2/zz_generated.deepcopy.go
generated
Normal file
File diff suppressed because it is too large
Load Diff
63
pkg/apis/types/v1beta1/federateddingtalkconfig_types.go
Normal file
63
pkg/apis/types/v1beta1/federateddingtalkconfig_types.go
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedDingTalkConfig = "federateddingtalkconfigs"
|
||||
ResourceSingularFederatedDingTalkConfig = "federateddingtalkconfig"
|
||||
FederatedDingTalkConfigKind = "FederatedDingTalkConfig"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedDingTalkConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedDingTalkConfigSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedDingTalkConfigSpec struct {
|
||||
Template DingTalkConfigTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type DingTalkConfigTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.DingTalkConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedDingTalkConfigList contains a list of federateddingtalkconfiglists
|
||||
type FederatedDingTalkConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedDingTalkConfig `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federateddingtalkreceiver_types.go
Normal file
62
pkg/apis/types/v1beta1/federateddingtalkreceiver_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedDingTalkReceiver = "federateddingtalkreceivers"
|
||||
ResourceSingularFederatedDingTalkReceiver = "federateddingtalkreceiver"
|
||||
FederatedDingTalkReceiverKind = "FederatedDingTalkReceiver"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedDingTalkReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedDingTalkReceiverSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedDingTalkReceiverSpec struct {
|
||||
Template DingTalkReceiverTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type DingTalkReceiverTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.DingTalkReceiverSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedDingTalkConfigList contains a list of federateddingtalkreceiverlists
|
||||
type FederatedDingTalkReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedDingTalkReceiver `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedemailconfig_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedemailconfig_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedEmailConfig = "federatedemailconfigs"
|
||||
ResourceSingularFederatedEmailConfig = "federatedemailconfig"
|
||||
FederatedEmailConfigKind = "FederatedEmailConfig"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedEmailConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedEmailConfigSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedEmailConfigSpec struct {
|
||||
Template EmailConfigTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type EmailConfigTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.EmailConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedEmailConfigList contains a list of federatedemailconfiglists
|
||||
type FederatedEmailConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedEmailConfig `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedemailreceiver_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedemailreceiver_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedEmailReceiver = "federatedemailreceivers"
|
||||
ResourceSingularFederatedEmailReceiver = "federatedemailreceiver"
|
||||
FederatedEmailReceiverKind = "FederatedEmailReceiver"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedEmailReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedEmailReceiverSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedEmailReceiverSpec struct {
|
||||
Template EmailReceiverTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type EmailReceiverTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.EmailReceiverSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedEmailConfigList contains a list of federatedemailconfiglists
|
||||
type FederatedEmailReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedEmailReceiver `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedslackconfig_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedslackconfig_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedSlackConfig = "federatedslackconfigs"
|
||||
ResourceSingularFederatedSlackConfig = "federatedslackconfig"
|
||||
FederatedSlackConfigKind = "FederatedSlackConfig"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedSlackConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedSlackConfigSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedSlackConfigSpec struct {
|
||||
Template SlackConfigTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type SlackConfigTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.SlackConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedSlackConfigList contains a list of federatedslackconfiglists
|
||||
type FederatedSlackConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedSlackConfig `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedslackreceiver_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedslackreceiver_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedSlackReceiver = "federatedslackreceivers"
|
||||
ResourceSingularFederatedSlackReceiver = "federatedslackreceiver"
|
||||
FederatedSlackReceiverKind = "FederatedSlackReceiver"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedSlackReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedSlackReceiverSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedSlackReceiverSpec struct {
|
||||
Template SlackReceiverTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type SlackReceiverTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.SlackReceiverSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedSlackConfigList contains a list of federatedslackconfiglists
|
||||
type FederatedSlackReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedSlackReceiver `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedwebhookconfig_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedwebhookconfig_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedWebhookConfig = "federatedwebhookconfigs"
|
||||
ResourceSingularFederatedWebhookConfig = "federatedwebhookconfig"
|
||||
FederatedWebhookConfigKind = "FederatedWebhookConfig"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedWebhookConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedWebhookConfigSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedWebhookConfigSpec struct {
|
||||
Template WebhookConfigTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type WebhookConfigTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.WebhookConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedWebhookConfigList contains a list of federatedwebhookconfiglists
|
||||
type FederatedWebhookConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedWebhookConfig `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedwebhookreceiver_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedwebhookreceiver_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedWebhookReceiver = "federatedwebhookreceivers"
|
||||
ResourceSingularFederatedWebhookReceiver = "federatedwebhookreceiver"
|
||||
FederatedWebhookReceiverKind = "FederatedWebhookReceiver"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedWebhookReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedWebhookReceiverSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedWebhookReceiverSpec struct {
|
||||
Template WebhookReceiverTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type WebhookReceiverTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.WebhookReceiverSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedWebhookConfigList contains a list of federatedwebhookconfiglists
|
||||
type FederatedWebhookReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedWebhookReceiver `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedwechatconfig_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedwechatconfig_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedWechatConfig = "federatedwechatconfigs"
|
||||
ResourceSingularFederatedWechatConfig = "federatedwechatconfig"
|
||||
FederatedWechatConfigKind = "FederatedWechatConfig"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedWechatConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedWechatConfigSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedWechatConfigSpec struct {
|
||||
Template WechatConfigTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type WechatConfigTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.WechatConfigSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedWechatConfigList contains a list of federatedwechatconfiglists
|
||||
type FederatedWechatConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedWechatConfig `json:"items"`
|
||||
}
|
||||
62
pkg/apis/types/v1beta1/federatedwechatreceiver_types.go
Normal file
62
pkg/apis/types/v1beta1/federatedwechatreceiver_types.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright 2020 KubeSphere Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
ResourcePluralFederatedWechatReceiver = "federatedwechatreceivers"
|
||||
ResourceSingularFederatedWechatReceiver = "federatedwechatreceiver"
|
||||
FederatedWechatReceiverKind = "FederatedWechatReceiver"
|
||||
)
|
||||
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:resource:scope=Cluster
|
||||
// +kubebuilder:subresource:status
|
||||
type FederatedWechatReceiver struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec FederatedWechatReceiverSpec `json:"spec"`
|
||||
|
||||
Status *GenericFederatedStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type FederatedWechatReceiverSpec struct {
|
||||
Template WechatReceiverTemplate `json:"template"`
|
||||
Placement GenericPlacementFields `json:"placement"`
|
||||
Overrides []GenericOverrideItem `json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
type WechatReceiverTemplate struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec v2.WechatReceiverSpec `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// FederatedWechatConfigList contains a list of federatedwechatconfiglists
|
||||
type FederatedWechatReceiverList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []FederatedWechatReceiver `json:"items"`
|
||||
}
|
||||
@@ -56,6 +56,14 @@ func init() {
|
||||
&FederatedConfigMapList{},
|
||||
&FederatedDeployment{},
|
||||
&FederatedDeploymentList{},
|
||||
&FederatedDingTalkConfig{},
|
||||
&FederatedDingTalkConfigList{},
|
||||
&FederatedDingTalkReceiver{},
|
||||
&FederatedDingTalkReceiverList{},
|
||||
&FederatedEmailConfig{},
|
||||
&FederatedEmailConfigList{},
|
||||
&FederatedEmailReceiver{},
|
||||
&FederatedEmailReceiverList{},
|
||||
&FederatedIngress{},
|
||||
&FederatedIngressList{},
|
||||
&FederatedLimitRange{},
|
||||
@@ -70,12 +78,24 @@ func init() {
|
||||
&FederatedSecretList{},
|
||||
&FederatedService{},
|
||||
&FederatedServiceList{},
|
||||
&FederatedSlackConfig{},
|
||||
&FederatedSlackConfigList{},
|
||||
&FederatedSlackReceiver{},
|
||||
&FederatedSlackReceiverList{},
|
||||
&FederatedStatefulSet{},
|
||||
&FederatedStatefulSetList{},
|
||||
&FederatedUser{},
|
||||
&FederatedUserList{},
|
||||
&FederatedGroup{},
|
||||
&FederatedGroupList{},
|
||||
&FederatedWebhookConfig{},
|
||||
&FederatedWebhookConfigList{},
|
||||
&FederatedWebhookReceiver{},
|
||||
&FederatedWebhookReceiverList{},
|
||||
&FederatedWechatConfig{},
|
||||
&FederatedWechatConfigList{},
|
||||
&FederatedWechatReceiver{},
|
||||
&FederatedWechatReceiverList{},
|
||||
&FederatedWorkspace{},
|
||||
&FederatedWorkspaceList{},
|
||||
&FederatedWorkspaceRole{},
|
||||
|
||||
1080
pkg/apis/types/v1beta1/zz_generated.deepcopy.go
generated
1080
pkg/apis/types/v1beta1/zz_generated.deepcopy.go
generated
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,7 @@ import (
|
||||
"k8s.io/klog"
|
||||
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
|
||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
|
||||
typesv1beta1 "kubesphere.io/kubesphere/pkg/apis/types/v1beta1"
|
||||
audit "kubesphere.io/kubesphere/pkg/apiserver/auditing"
|
||||
@@ -68,6 +69,7 @@ import (
|
||||
monitoringv1alpha3 "kubesphere.io/kubesphere/pkg/kapis/monitoring/v1alpha3"
|
||||
networkv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/network/v1alpha2"
|
||||
notificationv1 "kubesphere.io/kubesphere/pkg/kapis/notification/v1"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/kapis/notification/v2"
|
||||
"kubesphere.io/kubesphere/pkg/kapis/oauth"
|
||||
openpitrixv1 "kubesphere.io/kubesphere/pkg/kapis/openpitrix/v1"
|
||||
operationsv1alpha2 "kubesphere.io/kubesphere/pkg/kapis/operations/v1alpha2"
|
||||
@@ -270,6 +272,8 @@ func (s *APIServer) installKubeSphereAPIs() {
|
||||
s.KubernetesClient.Prometheus(), s.AlertingClient, s.Config.AlertingOptions))
|
||||
urlruntime.Must(version.AddToContainer(s.container, s.KubernetesClient.Discovery()))
|
||||
urlruntime.Must(kubeedgev1alpha1.AddToContainer(s.container, s.Config.KubeEdgeOptions.Endpoint))
|
||||
urlruntime.Must(notificationv2.AddToContainer(s.container, s.InformerFactory, s.KubernetesClient.Kubernetes(),
|
||||
s.KubernetesClient.KubeSphere()))
|
||||
}
|
||||
|
||||
func (s *APIServer) Run(stopCh <-chan struct{}) (err error) {
|
||||
@@ -310,6 +314,16 @@ func (s *APIServer) buildHandlerChain(stopCh <-chan struct{}) {
|
||||
tenantv1alpha2.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||
clusterv1alpha1.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||
resourcev1alpha3.Resource(clusterv1alpha1.ResourcesPluralCluster),
|
||||
v2.Resource(v2.ResourcesPluralDingTalkConfig),
|
||||
v2.Resource(v2.ResourcesPluralDingTalkReceiver),
|
||||
v2.Resource(v2.ResourcesPluralEmailReceiver),
|
||||
v2.Resource(v2.ResourcesPluralEmailConfig),
|
||||
v2.Resource(v2.ResourcesPluralSlackConfig),
|
||||
v2.Resource(v2.ResourcesPluralSlackReceiver),
|
||||
v2.Resource(v2.ResourcesPluralWebhookConfig),
|
||||
v2.Resource(v2.ResourcesPluralWebhookReceiver),
|
||||
v2.Resource(v2.ResourcesPluralWechatConfig),
|
||||
v2.Resource(v2.ResourcesPluralWechatReceiver),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -443,6 +457,16 @@ func (s *APIServer) waitForResourceSync(stopCh <-chan struct{}) error {
|
||||
{Group: "cluster.kubesphere.io", Version: "v1alpha1", Resource: "clusters"},
|
||||
{Group: "devops.kubesphere.io", Version: "v1alpha3", Resource: "devopsprojects"},
|
||||
{Group: "network.kubesphere.io", Version: "v1alpha1", Resource: "ippools"},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralDingTalkConfig},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralDingTalkReceiver},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralEmailConfig},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralEmailReceiver},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralSlackConfig},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralSlackReceiver},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWebhookConfig},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWebhookReceiver},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWechatConfig},
|
||||
{Group: "notification.kubesphere.io", Version: "v2", Resource: v2.ResourcesPluralWechatReceiver},
|
||||
}
|
||||
|
||||
devopsGVRs := []schema.GroupVersionResource{
|
||||
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/devops/v1alpha3"
|
||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2"
|
||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1"
|
||||
@@ -48,6 +49,7 @@ type Interface interface {
|
||||
DevopsV1alpha3() devopsv1alpha3.DevopsV1alpha3Interface
|
||||
IamV1alpha2() iamv1alpha2.IamV1alpha2Interface
|
||||
NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface
|
||||
NotificationV2() notificationv2.NotificationV2Interface
|
||||
QuotaV1alpha2() quotav1alpha2.QuotaV1alpha2Interface
|
||||
ServicemeshV1alpha2() servicemeshv1alpha2.ServicemeshV1alpha2Interface
|
||||
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
|
||||
@@ -67,6 +69,7 @@ type Clientset struct {
|
||||
devopsV1alpha3 *devopsv1alpha3.DevopsV1alpha3Client
|
||||
iamV1alpha2 *iamv1alpha2.IamV1alpha2Client
|
||||
networkV1alpha1 *networkv1alpha1.NetworkV1alpha1Client
|
||||
notificationV2 *notificationv2.NotificationV2Client
|
||||
quotaV1alpha2 *quotav1alpha2.QuotaV1alpha2Client
|
||||
servicemeshV1alpha2 *servicemeshv1alpha2.ServicemeshV1alpha2Client
|
||||
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
|
||||
@@ -110,6 +113,11 @@ func (c *Clientset) NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface {
|
||||
return c.networkV1alpha1
|
||||
}
|
||||
|
||||
// NotificationV2 retrieves the NotificationV2Client
|
||||
func (c *Clientset) NotificationV2() notificationv2.NotificationV2Interface {
|
||||
return c.notificationV2
|
||||
}
|
||||
|
||||
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
||||
func (c *Clientset) QuotaV1alpha2() quotav1alpha2.QuotaV1alpha2Interface {
|
||||
return c.quotaV1alpha2
|
||||
@@ -189,6 +197,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.notificationV2, err = notificationv2.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.quotaV1alpha2, err = quotav1alpha2.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -232,6 +244,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
cs.devopsV1alpha3 = devopsv1alpha3.NewForConfigOrDie(c)
|
||||
cs.iamV1alpha2 = iamv1alpha2.NewForConfigOrDie(c)
|
||||
cs.networkV1alpha1 = networkv1alpha1.NewForConfigOrDie(c)
|
||||
cs.notificationV2 = notificationv2.NewForConfigOrDie(c)
|
||||
cs.quotaV1alpha2 = quotav1alpha2.NewForConfigOrDie(c)
|
||||
cs.servicemeshV1alpha2 = servicemeshv1alpha2.NewForConfigOrDie(c)
|
||||
cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
|
||||
@@ -253,6 +266,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.devopsV1alpha3 = devopsv1alpha3.New(c)
|
||||
cs.iamV1alpha2 = iamv1alpha2.New(c)
|
||||
cs.networkV1alpha1 = networkv1alpha1.New(c)
|
||||
cs.notificationV2 = notificationv2.New(c)
|
||||
cs.quotaV1alpha2 = quotav1alpha2.New(c)
|
||||
cs.servicemeshV1alpha2 = servicemeshv1alpha2.New(c)
|
||||
cs.storageV1alpha1 = storagev1alpha1.New(c)
|
||||
|
||||
@@ -39,6 +39,8 @@ import (
|
||||
fakeiamv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/iam/v1alpha2/fake"
|
||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1"
|
||||
fakenetworkv1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/network/v1alpha1/fake"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
||||
fakenotificationv2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2/fake"
|
||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2"
|
||||
fakequotav1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/quota/v1alpha2/fake"
|
||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/servicemesh/v1alpha2"
|
||||
@@ -135,6 +137,11 @@ func (c *Clientset) NetworkV1alpha1() networkv1alpha1.NetworkV1alpha1Interface {
|
||||
return &fakenetworkv1alpha1.FakeNetworkV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// NotificationV2 retrieves the NotificationV2Client
|
||||
func (c *Clientset) NotificationV2() notificationv2.NotificationV2Interface {
|
||||
return &fakenotificationv2.FakeNotificationV2{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// QuotaV1alpha2 retrieves the QuotaV1alpha2Client
|
||||
func (c *Clientset) QuotaV1alpha2() quotav1alpha2.QuotaV1alpha2Interface {
|
||||
return &fakequotav1alpha2.FakeQuotaV1alpha2{Fake: &c.Fake}
|
||||
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||
@@ -50,6 +51,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
devopsv1alpha3.AddToScheme,
|
||||
iamv1alpha2.AddToScheme,
|
||||
networkv1alpha1.AddToScheme,
|
||||
notificationv2.AddToScheme,
|
||||
quotav1alpha2.AddToScheme,
|
||||
servicemeshv1alpha2.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
devopsv1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||
iamv1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||
@@ -50,6 +51,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
devopsv1alpha3.AddToScheme,
|
||||
iamv1alpha2.AddToScheme,
|
||||
networkv1alpha1.AddToScheme,
|
||||
notificationv2.AddToScheme,
|
||||
quotav1alpha2.AddToScheme,
|
||||
servicemeshv1alpha2.AddToScheme,
|
||||
storagev1alpha1.AddToScheme,
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// DingTalkConfigsGetter has a method to return a DingTalkConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DingTalkConfigsGetter interface {
|
||||
DingTalkConfigs() DingTalkConfigInterface
|
||||
}
|
||||
|
||||
// DingTalkConfigInterface has methods to work with DingTalkConfig resources.
|
||||
type DingTalkConfigInterface interface {
|
||||
Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (*v2.DingTalkConfig, error)
|
||||
Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error)
|
||||
UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.DingTalkConfig, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.DingTalkConfigList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error)
|
||||
DingTalkConfigExpansion
|
||||
}
|
||||
|
||||
// dingTalkConfigs implements DingTalkConfigInterface
|
||||
type dingTalkConfigs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newDingTalkConfigs returns a DingTalkConfigs
|
||||
func newDingTalkConfigs(c *NotificationV2Client) *dingTalkConfigs {
|
||||
return &dingTalkConfigs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
||||
func (c *dingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkConfig, err error) {
|
||||
result = &v2.DingTalkConfig{}
|
||||
err = c.client.Get().
|
||||
Resource("dingtalkconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
||||
func (c *dingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.DingTalkConfigList{}
|
||||
err = c.client.Get().
|
||||
Resource("dingtalkconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested dingTalkConfigs.
|
||||
func (c *dingTalkConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("dingtalkconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||
func (c *dingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (result *v2.DingTalkConfig, err error) {
|
||||
result = &v2.DingTalkConfig{}
|
||||
err = c.client.Post().
|
||||
Resource("dingtalkconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||
func (c *dingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
||||
result = &v2.DingTalkConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("dingtalkconfigs").
|
||||
Name(dingTalkConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *dingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
||||
result = &v2.DingTalkConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("dingtalkconfigs").
|
||||
Name(dingTalkConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the dingTalkConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *dingTalkConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("dingtalkconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *dingTalkConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("dingtalkconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched dingTalkConfig.
|
||||
func (c *dingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error) {
|
||||
result = &v2.DingTalkConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("dingtalkconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// DingTalkReceiversGetter has a method to return a DingTalkReceiverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DingTalkReceiversGetter interface {
|
||||
DingTalkReceivers() DingTalkReceiverInterface
|
||||
}
|
||||
|
||||
// DingTalkReceiverInterface has methods to work with DingTalkReceiver resources.
|
||||
type DingTalkReceiverInterface interface {
|
||||
Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (*v2.DingTalkReceiver, error)
|
||||
Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error)
|
||||
UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.DingTalkReceiver, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.DingTalkReceiverList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error)
|
||||
DingTalkReceiverExpansion
|
||||
}
|
||||
|
||||
// dingTalkReceivers implements DingTalkReceiverInterface
|
||||
type dingTalkReceivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newDingTalkReceivers returns a DingTalkReceivers
|
||||
func newDingTalkReceivers(c *NotificationV2Client) *dingTalkReceivers {
|
||||
return &dingTalkReceivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
||||
func (c *dingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
result = &v2.DingTalkReceiver{}
|
||||
err = c.client.Get().
|
||||
Resource("dingtalkreceivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
||||
func (c *dingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkReceiverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.DingTalkReceiverList{}
|
||||
err = c.client.Get().
|
||||
Resource("dingtalkreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested dingTalkReceivers.
|
||||
func (c *dingTalkReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("dingtalkreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||
func (c *dingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
result = &v2.DingTalkReceiver{}
|
||||
err = c.client.Post().
|
||||
Resource("dingtalkreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||
func (c *dingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
result = &v2.DingTalkReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("dingtalkreceivers").
|
||||
Name(dingTalkReceiver.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *dingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
result = &v2.DingTalkReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("dingtalkreceivers").
|
||||
Name(dingTalkReceiver.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(dingTalkReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the dingTalkReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *dingTalkReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("dingtalkreceivers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *dingTalkReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("dingtalkreceivers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched dingTalkReceiver.
|
||||
func (c *dingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error) {
|
||||
result = &v2.DingTalkReceiver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("dingtalkreceivers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
20
pkg/client/clientset/versioned/typed/notification/v2/doc.go
Normal file
20
pkg/client/clientset/versioned/typed/notification/v2/doc.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v2
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// EmailConfigsGetter has a method to return a EmailConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type EmailConfigsGetter interface {
|
||||
EmailConfigs() EmailConfigInterface
|
||||
}
|
||||
|
||||
// EmailConfigInterface has methods to work with EmailConfig resources.
|
||||
type EmailConfigInterface interface {
|
||||
Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (*v2.EmailConfig, error)
|
||||
Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error)
|
||||
UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.EmailConfig, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.EmailConfigList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error)
|
||||
EmailConfigExpansion
|
||||
}
|
||||
|
||||
// emailConfigs implements EmailConfigInterface
|
||||
type emailConfigs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newEmailConfigs returns a EmailConfigs
|
||||
func newEmailConfigs(c *NotificationV2Client) *emailConfigs {
|
||||
return &emailConfigs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
||||
func (c *emailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailConfig, err error) {
|
||||
result = &v2.EmailConfig{}
|
||||
err = c.client.Get().
|
||||
Resource("emailconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
||||
func (c *emailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.EmailConfigList{}
|
||||
err = c.client.Get().
|
||||
Resource("emailconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested emailConfigs.
|
||||
func (c *emailConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("emailconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||
func (c *emailConfigs) Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (result *v2.EmailConfig, err error) {
|
||||
result = &v2.EmailConfig{}
|
||||
err = c.client.Post().
|
||||
Resource("emailconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||
func (c *emailConfigs) Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
||||
result = &v2.EmailConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("emailconfigs").
|
||||
Name(emailConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *emailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
||||
result = &v2.EmailConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("emailconfigs").
|
||||
Name(emailConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the emailConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *emailConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("emailconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *emailConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("emailconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched emailConfig.
|
||||
func (c *emailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error) {
|
||||
result = &v2.EmailConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("emailconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// EmailReceiversGetter has a method to return a EmailReceiverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type EmailReceiversGetter interface {
|
||||
EmailReceivers() EmailReceiverInterface
|
||||
}
|
||||
|
||||
// EmailReceiverInterface has methods to work with EmailReceiver resources.
|
||||
type EmailReceiverInterface interface {
|
||||
Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (*v2.EmailReceiver, error)
|
||||
Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error)
|
||||
UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.EmailReceiver, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.EmailReceiverList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error)
|
||||
EmailReceiverExpansion
|
||||
}
|
||||
|
||||
// emailReceivers implements EmailReceiverInterface
|
||||
type emailReceivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newEmailReceivers returns a EmailReceivers
|
||||
func newEmailReceivers(c *NotificationV2Client) *emailReceivers {
|
||||
return &emailReceivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
||||
func (c *emailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailReceiver, err error) {
|
||||
result = &v2.EmailReceiver{}
|
||||
err = c.client.Get().
|
||||
Resource("emailreceivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
||||
func (c *emailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailReceiverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.EmailReceiverList{}
|
||||
err = c.client.Get().
|
||||
Resource("emailreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested emailReceivers.
|
||||
func (c *emailReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("emailreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||
func (c *emailReceivers) Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (result *v2.EmailReceiver, err error) {
|
||||
result = &v2.EmailReceiver{}
|
||||
err = c.client.Post().
|
||||
Resource("emailreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||
func (c *emailReceivers) Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
||||
result = &v2.EmailReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("emailreceivers").
|
||||
Name(emailReceiver.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *emailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
||||
result = &v2.EmailReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("emailreceivers").
|
||||
Name(emailReceiver.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(emailReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the emailReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *emailReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("emailreceivers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *emailReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("emailreceivers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched emailReceiver.
|
||||
func (c *emailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error) {
|
||||
result = &v2.EmailReceiver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("emailreceivers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeDingTalkConfigs implements DingTalkConfigInterface
|
||||
type FakeDingTalkConfigs struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var dingtalkconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "dingtalkconfigs"}
|
||||
|
||||
var dingtalkconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "DingTalkConfig"}
|
||||
|
||||
// Get takes name of the dingTalkConfig, and returns the corresponding dingTalkConfig object, and an error if there is any.
|
||||
func (c *FakeDingTalkConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(dingtalkconfigsResource, name), &v2.DingTalkConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DingTalkConfigs that match those selectors.
|
||||
func (c *FakeDingTalkConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(dingtalkconfigsResource, dingtalkconfigsKind, opts), &v2.DingTalkConfigList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.DingTalkConfigList{ListMeta: obj.(*v2.DingTalkConfigList).ListMeta}
|
||||
for _, item := range obj.(*v2.DingTalkConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested dingTalkConfigs.
|
||||
func (c *FakeDingTalkConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(dingtalkconfigsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a dingTalkConfig and creates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||
func (c *FakeDingTalkConfigs) Create(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.CreateOptions) (result *v2.DingTalkConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(dingtalkconfigsResource, dingTalkConfig), &v2.DingTalkConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a dingTalkConfig and updates it. Returns the server's representation of the dingTalkConfig, and an error, if there is any.
|
||||
func (c *FakeDingTalkConfigs) Update(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (result *v2.DingTalkConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(dingtalkconfigsResource, dingTalkConfig), &v2.DingTalkConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDingTalkConfigs) UpdateStatus(ctx context.Context, dingTalkConfig *v2.DingTalkConfig, opts v1.UpdateOptions) (*v2.DingTalkConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkconfigsResource, "status", dingTalkConfig), &v2.DingTalkConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the dingTalkConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDingTalkConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(dingtalkconfigsResource, name), &v2.DingTalkConfig{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDingTalkConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(dingtalkconfigsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.DingTalkConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched dingTalkConfig.
|
||||
func (c *FakeDingTalkConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(dingtalkconfigsResource, name, pt, data, subresources...), &v2.DingTalkConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeDingTalkReceivers implements DingTalkReceiverInterface
|
||||
type FakeDingTalkReceivers struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var dingtalkreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "dingtalkreceivers"}
|
||||
|
||||
var dingtalkreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "DingTalkReceiver"}
|
||||
|
||||
// Get takes name of the dingTalkReceiver, and returns the corresponding dingTalkReceiver object, and an error if there is any.
|
||||
func (c *FakeDingTalkReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(dingtalkreceiversResource, name), &v2.DingTalkReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkReceiver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DingTalkReceivers that match those selectors.
|
||||
func (c *FakeDingTalkReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.DingTalkReceiverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(dingtalkreceiversResource, dingtalkreceiversKind, opts), &v2.DingTalkReceiverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.DingTalkReceiverList{ListMeta: obj.(*v2.DingTalkReceiverList).ListMeta}
|
||||
for _, item := range obj.(*v2.DingTalkReceiverList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested dingTalkReceivers.
|
||||
func (c *FakeDingTalkReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(dingtalkreceiversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a dingTalkReceiver and creates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||
func (c *FakeDingTalkReceivers) Create(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.CreateOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(dingtalkreceiversResource, dingTalkReceiver), &v2.DingTalkReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkReceiver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a dingTalkReceiver and updates it. Returns the server's representation of the dingTalkReceiver, and an error, if there is any.
|
||||
func (c *FakeDingTalkReceivers) Update(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (result *v2.DingTalkReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(dingtalkreceiversResource, dingTalkReceiver), &v2.DingTalkReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkReceiver), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDingTalkReceivers) UpdateStatus(ctx context.Context, dingTalkReceiver *v2.DingTalkReceiver, opts v1.UpdateOptions) (*v2.DingTalkReceiver, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(dingtalkreceiversResource, "status", dingTalkReceiver), &v2.DingTalkReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkReceiver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the dingTalkReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDingTalkReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(dingtalkreceiversResource, name), &v2.DingTalkReceiver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDingTalkReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(dingtalkreceiversResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.DingTalkReceiverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched dingTalkReceiver.
|
||||
func (c *FakeDingTalkReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.DingTalkReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(dingtalkreceiversResource, name, pt, data, subresources...), &v2.DingTalkReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.DingTalkReceiver), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeEmailConfigs implements EmailConfigInterface
|
||||
type FakeEmailConfigs struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var emailconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "emailconfigs"}
|
||||
|
||||
var emailconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "EmailConfig"}
|
||||
|
||||
// Get takes name of the emailConfig, and returns the corresponding emailConfig object, and an error if there is any.
|
||||
func (c *FakeEmailConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(emailconfigsResource, name), &v2.EmailConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EmailConfigs that match those selectors.
|
||||
func (c *FakeEmailConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(emailconfigsResource, emailconfigsKind, opts), &v2.EmailConfigList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.EmailConfigList{ListMeta: obj.(*v2.EmailConfigList).ListMeta}
|
||||
for _, item := range obj.(*v2.EmailConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested emailConfigs.
|
||||
func (c *FakeEmailConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(emailconfigsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a emailConfig and creates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||
func (c *FakeEmailConfigs) Create(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.CreateOptions) (result *v2.EmailConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(emailconfigsResource, emailConfig), &v2.EmailConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a emailConfig and updates it. Returns the server's representation of the emailConfig, and an error, if there is any.
|
||||
func (c *FakeEmailConfigs) Update(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (result *v2.EmailConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(emailconfigsResource, emailConfig), &v2.EmailConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeEmailConfigs) UpdateStatus(ctx context.Context, emailConfig *v2.EmailConfig, opts v1.UpdateOptions) (*v2.EmailConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(emailconfigsResource, "status", emailConfig), &v2.EmailConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the emailConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEmailConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(emailconfigsResource, name), &v2.EmailConfig{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEmailConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(emailconfigsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.EmailConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched emailConfig.
|
||||
func (c *FakeEmailConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(emailconfigsResource, name, pt, data, subresources...), &v2.EmailConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailConfig), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeEmailReceivers implements EmailReceiverInterface
|
||||
type FakeEmailReceivers struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var emailreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "emailreceivers"}
|
||||
|
||||
var emailreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "EmailReceiver"}
|
||||
|
||||
// Get takes name of the emailReceiver, and returns the corresponding emailReceiver object, and an error if there is any.
|
||||
func (c *FakeEmailReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.EmailReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(emailreceiversResource, name), &v2.EmailReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailReceiver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of EmailReceivers that match those selectors.
|
||||
func (c *FakeEmailReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.EmailReceiverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(emailreceiversResource, emailreceiversKind, opts), &v2.EmailReceiverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.EmailReceiverList{ListMeta: obj.(*v2.EmailReceiverList).ListMeta}
|
||||
for _, item := range obj.(*v2.EmailReceiverList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested emailReceivers.
|
||||
func (c *FakeEmailReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(emailreceiversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a emailReceiver and creates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||
func (c *FakeEmailReceivers) Create(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.CreateOptions) (result *v2.EmailReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(emailreceiversResource, emailReceiver), &v2.EmailReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailReceiver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a emailReceiver and updates it. Returns the server's representation of the emailReceiver, and an error, if there is any.
|
||||
func (c *FakeEmailReceivers) Update(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (result *v2.EmailReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(emailreceiversResource, emailReceiver), &v2.EmailReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailReceiver), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeEmailReceivers) UpdateStatus(ctx context.Context, emailReceiver *v2.EmailReceiver, opts v1.UpdateOptions) (*v2.EmailReceiver, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(emailreceiversResource, "status", emailReceiver), &v2.EmailReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailReceiver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the emailReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEmailReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(emailreceiversResource, name), &v2.EmailReceiver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEmailReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(emailreceiversResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.EmailReceiverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched emailReceiver.
|
||||
func (c *FakeEmailReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.EmailReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(emailreceiversResource, name, pt, data, subresources...), &v2.EmailReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.EmailReceiver), err
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/notification/v2"
|
||||
)
|
||||
|
||||
type FakeNotificationV2 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) DingTalkConfigs() v2.DingTalkConfigInterface {
|
||||
return &FakeDingTalkConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) DingTalkReceivers() v2.DingTalkReceiverInterface {
|
||||
return &FakeDingTalkReceivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) EmailConfigs() v2.EmailConfigInterface {
|
||||
return &FakeEmailConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) EmailReceivers() v2.EmailReceiverInterface {
|
||||
return &FakeEmailReceivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) SlackConfigs() v2.SlackConfigInterface {
|
||||
return &FakeSlackConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) SlackReceivers() v2.SlackReceiverInterface {
|
||||
return &FakeSlackReceivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) WebhookConfigs() v2.WebhookConfigInterface {
|
||||
return &FakeWebhookConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) WebhookReceivers() v2.WebhookReceiverInterface {
|
||||
return &FakeWebhookReceivers{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) WechatConfigs() v2.WechatConfigInterface {
|
||||
return &FakeWechatConfigs{c}
|
||||
}
|
||||
|
||||
func (c *FakeNotificationV2) WechatReceivers() v2.WechatReceiverInterface {
|
||||
return &FakeWechatReceivers{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeNotificationV2) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeSlackConfigs implements SlackConfigInterface
|
||||
type FakeSlackConfigs struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var slackconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "slackconfigs"}
|
||||
|
||||
var slackconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "SlackConfig"}
|
||||
|
||||
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
||||
func (c *FakeSlackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(slackconfigsResource, name), &v2.SlackConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
||||
func (c *FakeSlackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(slackconfigsResource, slackconfigsKind, opts), &v2.SlackConfigList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.SlackConfigList{ListMeta: obj.(*v2.SlackConfigList).ListMeta}
|
||||
for _, item := range obj.(*v2.SlackConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested slackConfigs.
|
||||
func (c *FakeSlackConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(slackconfigsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||
func (c *FakeSlackConfigs) Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (result *v2.SlackConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(slackconfigsResource, slackConfig), &v2.SlackConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||
func (c *FakeSlackConfigs) Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(slackconfigsResource, slackConfig), &v2.SlackConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeSlackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(slackconfigsResource, "status", slackConfig), &v2.SlackConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the slackConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeSlackConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(slackconfigsResource, name), &v2.SlackConfig{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeSlackConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(slackconfigsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.SlackConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched slackConfig.
|
||||
func (c *FakeSlackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(slackconfigsResource, name, pt, data, subresources...), &v2.SlackConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackConfig), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeSlackReceivers implements SlackReceiverInterface
|
||||
type FakeSlackReceivers struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var slackreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "slackreceivers"}
|
||||
|
||||
var slackreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "SlackReceiver"}
|
||||
|
||||
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
||||
func (c *FakeSlackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(slackreceiversResource, name), &v2.SlackReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackReceiver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
||||
func (c *FakeSlackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackReceiverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(slackreceiversResource, slackreceiversKind, opts), &v2.SlackReceiverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.SlackReceiverList{ListMeta: obj.(*v2.SlackReceiverList).ListMeta}
|
||||
for _, item := range obj.(*v2.SlackReceiverList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested slackReceivers.
|
||||
func (c *FakeSlackReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(slackreceiversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||
func (c *FakeSlackReceivers) Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (result *v2.SlackReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(slackreceiversResource, slackReceiver), &v2.SlackReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackReceiver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||
func (c *FakeSlackReceivers) Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(slackreceiversResource, slackReceiver), &v2.SlackReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackReceiver), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeSlackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(slackreceiversResource, "status", slackReceiver), &v2.SlackReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackReceiver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the slackReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeSlackReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(slackreceiversResource, name), &v2.SlackReceiver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeSlackReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(slackreceiversResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.SlackReceiverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched slackReceiver.
|
||||
func (c *FakeSlackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(slackreceiversResource, name, pt, data, subresources...), &v2.SlackReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.SlackReceiver), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeWebhookConfigs implements WebhookConfigInterface
|
||||
type FakeWebhookConfigs struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var webhookconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "webhookconfigs"}
|
||||
|
||||
var webhookconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WebhookConfig"}
|
||||
|
||||
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
||||
func (c *FakeWebhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(webhookconfigsResource, name), &v2.WebhookConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
||||
func (c *FakeWebhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(webhookconfigsResource, webhookconfigsKind, opts), &v2.WebhookConfigList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.WebhookConfigList{ListMeta: obj.(*v2.WebhookConfigList).ListMeta}
|
||||
for _, item := range obj.(*v2.WebhookConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested webhookConfigs.
|
||||
func (c *FakeWebhookConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(webhookconfigsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||
func (c *FakeWebhookConfigs) Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (result *v2.WebhookConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(webhookconfigsResource, webhookConfig), &v2.WebhookConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||
func (c *FakeWebhookConfigs) Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(webhookconfigsResource, webhookConfig), &v2.WebhookConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeWebhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(webhookconfigsResource, "status", webhookConfig), &v2.WebhookConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the webhookConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeWebhookConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(webhookconfigsResource, name), &v2.WebhookConfig{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeWebhookConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(webhookconfigsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.WebhookConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched webhookConfig.
|
||||
func (c *FakeWebhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(webhookconfigsResource, name, pt, data, subresources...), &v2.WebhookConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookConfig), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeWebhookReceivers implements WebhookReceiverInterface
|
||||
type FakeWebhookReceivers struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var webhookreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "webhookreceivers"}
|
||||
|
||||
var webhookreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WebhookReceiver"}
|
||||
|
||||
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
||||
func (c *FakeWebhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(webhookreceiversResource, name), &v2.WebhookReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookReceiver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
||||
func (c *FakeWebhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookReceiverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(webhookreceiversResource, webhookreceiversKind, opts), &v2.WebhookReceiverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.WebhookReceiverList{ListMeta: obj.(*v2.WebhookReceiverList).ListMeta}
|
||||
for _, item := range obj.(*v2.WebhookReceiverList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested webhookReceivers.
|
||||
func (c *FakeWebhookReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(webhookreceiversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||
func (c *FakeWebhookReceivers) Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (result *v2.WebhookReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(webhookreceiversResource, webhookReceiver), &v2.WebhookReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookReceiver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||
func (c *FakeWebhookReceivers) Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(webhookreceiversResource, webhookReceiver), &v2.WebhookReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookReceiver), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeWebhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(webhookreceiversResource, "status", webhookReceiver), &v2.WebhookReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookReceiver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the webhookReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeWebhookReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(webhookreceiversResource, name), &v2.WebhookReceiver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeWebhookReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(webhookreceiversResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.WebhookReceiverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched webhookReceiver.
|
||||
func (c *FakeWebhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(webhookreceiversResource, name, pt, data, subresources...), &v2.WebhookReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WebhookReceiver), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeWechatConfigs implements WechatConfigInterface
|
||||
type FakeWechatConfigs struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var wechatconfigsResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "wechatconfigs"}
|
||||
|
||||
var wechatconfigsKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WechatConfig"}
|
||||
|
||||
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
||||
func (c *FakeWechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(wechatconfigsResource, name), &v2.WechatConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
||||
func (c *FakeWechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(wechatconfigsResource, wechatconfigsKind, opts), &v2.WechatConfigList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.WechatConfigList{ListMeta: obj.(*v2.WechatConfigList).ListMeta}
|
||||
for _, item := range obj.(*v2.WechatConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested wechatConfigs.
|
||||
func (c *FakeWechatConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(wechatconfigsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||
func (c *FakeWechatConfigs) Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (result *v2.WechatConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(wechatconfigsResource, wechatConfig), &v2.WechatConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatConfig), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||
func (c *FakeWechatConfigs) Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(wechatconfigsResource, wechatConfig), &v2.WechatConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeWechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(wechatconfigsResource, "status", wechatConfig), &v2.WechatConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the wechatConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeWechatConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(wechatconfigsResource, name), &v2.WechatConfig{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeWechatConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(wechatconfigsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.WechatConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched wechatConfig.
|
||||
func (c *FakeWechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(wechatconfigsResource, name, pt, data, subresources...), &v2.WechatConfig{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatConfig), err
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// FakeWechatReceivers implements WechatReceiverInterface
|
||||
type FakeWechatReceivers struct {
|
||||
Fake *FakeNotificationV2
|
||||
}
|
||||
|
||||
var wechatreceiversResource = schema.GroupVersionResource{Group: "notification.kubesphere.io", Version: "v2", Resource: "wechatreceivers"}
|
||||
|
||||
var wechatreceiversKind = schema.GroupVersionKind{Group: "notification.kubesphere.io", Version: "v2", Kind: "WechatReceiver"}
|
||||
|
||||
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
||||
func (c *FakeWechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(wechatreceiversResource, name), &v2.WechatReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatReceiver), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
||||
func (c *FakeWechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatReceiverList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(wechatreceiversResource, wechatreceiversKind, opts), &v2.WechatReceiverList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.WechatReceiverList{ListMeta: obj.(*v2.WechatReceiverList).ListMeta}
|
||||
for _, item := range obj.(*v2.WechatReceiverList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested wechatReceivers.
|
||||
func (c *FakeWechatReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(wechatreceiversResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||
func (c *FakeWechatReceivers) Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (result *v2.WechatReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(wechatreceiversResource, wechatReceiver), &v2.WechatReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatReceiver), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||
func (c *FakeWechatReceivers) Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(wechatreceiversResource, wechatReceiver), &v2.WechatReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatReceiver), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeWechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(wechatreceiversResource, "status", wechatReceiver), &v2.WechatReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatReceiver), err
|
||||
}
|
||||
|
||||
// Delete takes name of the wechatReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeWechatReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(wechatreceiversResource, name), &v2.WechatReceiver{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeWechatReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(wechatreceiversResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.WechatReceiverList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched wechatReceiver.
|
||||
func (c *FakeWechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(wechatreceiversResource, name, pt, data, subresources...), &v2.WechatReceiver{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.WechatReceiver), err
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
type DingTalkConfigExpansion interface{}
|
||||
|
||||
type DingTalkReceiverExpansion interface{}
|
||||
|
||||
type EmailConfigExpansion interface{}
|
||||
|
||||
type EmailReceiverExpansion interface{}
|
||||
|
||||
type SlackConfigExpansion interface{}
|
||||
|
||||
type SlackReceiverExpansion interface{}
|
||||
|
||||
type WebhookConfigExpansion interface{}
|
||||
|
||||
type WebhookReceiverExpansion interface{}
|
||||
|
||||
type WechatConfigExpansion interface{}
|
||||
|
||||
type WechatReceiverExpansion interface{}
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
type NotificationV2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DingTalkConfigsGetter
|
||||
DingTalkReceiversGetter
|
||||
EmailConfigsGetter
|
||||
EmailReceiversGetter
|
||||
SlackConfigsGetter
|
||||
SlackReceiversGetter
|
||||
WebhookConfigsGetter
|
||||
WebhookReceiversGetter
|
||||
WechatConfigsGetter
|
||||
WechatReceiversGetter
|
||||
}
|
||||
|
||||
// NotificationV2Client is used to interact with features provided by the notification.kubesphere.io group.
|
||||
type NotificationV2Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) DingTalkConfigs() DingTalkConfigInterface {
|
||||
return newDingTalkConfigs(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) DingTalkReceivers() DingTalkReceiverInterface {
|
||||
return newDingTalkReceivers(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) EmailConfigs() EmailConfigInterface {
|
||||
return newEmailConfigs(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) EmailReceivers() EmailReceiverInterface {
|
||||
return newEmailReceivers(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) SlackConfigs() SlackConfigInterface {
|
||||
return newSlackConfigs(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) SlackReceivers() SlackReceiverInterface {
|
||||
return newSlackReceivers(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) WebhookConfigs() WebhookConfigInterface {
|
||||
return newWebhookConfigs(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) WebhookReceivers() WebhookReceiverInterface {
|
||||
return newWebhookReceivers(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) WechatConfigs() WechatConfigInterface {
|
||||
return newWechatConfigs(c)
|
||||
}
|
||||
|
||||
func (c *NotificationV2Client) WechatReceivers() WechatReceiverInterface {
|
||||
return newWechatReceivers(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NotificationV2Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*NotificationV2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &NotificationV2Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new NotificationV2Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *NotificationV2Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new NotificationV2Client for the given RESTClient.
|
||||
func New(c rest.Interface) *NotificationV2Client {
|
||||
return &NotificationV2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *NotificationV2Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// SlackConfigsGetter has a method to return a SlackConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SlackConfigsGetter interface {
|
||||
SlackConfigs() SlackConfigInterface
|
||||
}
|
||||
|
||||
// SlackConfigInterface has methods to work with SlackConfig resources.
|
||||
type SlackConfigInterface interface {
|
||||
Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (*v2.SlackConfig, error)
|
||||
Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error)
|
||||
UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (*v2.SlackConfig, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.SlackConfig, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.SlackConfigList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error)
|
||||
SlackConfigExpansion
|
||||
}
|
||||
|
||||
// slackConfigs implements SlackConfigInterface
|
||||
type slackConfigs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSlackConfigs returns a SlackConfigs
|
||||
func newSlackConfigs(c *NotificationV2Client) *slackConfigs {
|
||||
return &slackConfigs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the slackConfig, and returns the corresponding slackConfig object, and an error if there is any.
|
||||
func (c *slackConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackConfig, err error) {
|
||||
result = &v2.SlackConfig{}
|
||||
err = c.client.Get().
|
||||
Resource("slackconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of SlackConfigs that match those selectors.
|
||||
func (c *slackConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.SlackConfigList{}
|
||||
err = c.client.Get().
|
||||
Resource("slackconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested slackConfigs.
|
||||
func (c *slackConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("slackconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a slackConfig and creates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||
func (c *slackConfigs) Create(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.CreateOptions) (result *v2.SlackConfig, err error) {
|
||||
result = &v2.SlackConfig{}
|
||||
err = c.client.Post().
|
||||
Resource("slackconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a slackConfig and updates it. Returns the server's representation of the slackConfig, and an error, if there is any.
|
||||
func (c *slackConfigs) Update(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
||||
result = &v2.SlackConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("slackconfigs").
|
||||
Name(slackConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *slackConfigs) UpdateStatus(ctx context.Context, slackConfig *v2.SlackConfig, opts v1.UpdateOptions) (result *v2.SlackConfig, err error) {
|
||||
result = &v2.SlackConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("slackconfigs").
|
||||
Name(slackConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the slackConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *slackConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("slackconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *slackConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("slackconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched slackConfig.
|
||||
func (c *slackConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackConfig, err error) {
|
||||
result = &v2.SlackConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("slackconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// SlackReceiversGetter has a method to return a SlackReceiverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SlackReceiversGetter interface {
|
||||
SlackReceivers() SlackReceiverInterface
|
||||
}
|
||||
|
||||
// SlackReceiverInterface has methods to work with SlackReceiver resources.
|
||||
type SlackReceiverInterface interface {
|
||||
Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (*v2.SlackReceiver, error)
|
||||
Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error)
|
||||
UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (*v2.SlackReceiver, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.SlackReceiver, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.SlackReceiverList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error)
|
||||
SlackReceiverExpansion
|
||||
}
|
||||
|
||||
// slackReceivers implements SlackReceiverInterface
|
||||
type slackReceivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSlackReceivers returns a SlackReceivers
|
||||
func newSlackReceivers(c *NotificationV2Client) *slackReceivers {
|
||||
return &slackReceivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the slackReceiver, and returns the corresponding slackReceiver object, and an error if there is any.
|
||||
func (c *slackReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.SlackReceiver, err error) {
|
||||
result = &v2.SlackReceiver{}
|
||||
err = c.client.Get().
|
||||
Resource("slackreceivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of SlackReceivers that match those selectors.
|
||||
func (c *slackReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.SlackReceiverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.SlackReceiverList{}
|
||||
err = c.client.Get().
|
||||
Resource("slackreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested slackReceivers.
|
||||
func (c *slackReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("slackreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a slackReceiver and creates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||
func (c *slackReceivers) Create(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.CreateOptions) (result *v2.SlackReceiver, err error) {
|
||||
result = &v2.SlackReceiver{}
|
||||
err = c.client.Post().
|
||||
Resource("slackreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a slackReceiver and updates it. Returns the server's representation of the slackReceiver, and an error, if there is any.
|
||||
func (c *slackReceivers) Update(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
||||
result = &v2.SlackReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("slackreceivers").
|
||||
Name(slackReceiver.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *slackReceivers) UpdateStatus(ctx context.Context, slackReceiver *v2.SlackReceiver, opts v1.UpdateOptions) (result *v2.SlackReceiver, err error) {
|
||||
result = &v2.SlackReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("slackreceivers").
|
||||
Name(slackReceiver.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(slackReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the slackReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *slackReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("slackreceivers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *slackReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("slackreceivers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched slackReceiver.
|
||||
func (c *slackReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.SlackReceiver, err error) {
|
||||
result = &v2.SlackReceiver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("slackreceivers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// WebhookConfigsGetter has a method to return a WebhookConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type WebhookConfigsGetter interface {
|
||||
WebhookConfigs() WebhookConfigInterface
|
||||
}
|
||||
|
||||
// WebhookConfigInterface has methods to work with WebhookConfig resources.
|
||||
type WebhookConfigInterface interface {
|
||||
Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (*v2.WebhookConfig, error)
|
||||
Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error)
|
||||
UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (*v2.WebhookConfig, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WebhookConfig, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WebhookConfigList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error)
|
||||
WebhookConfigExpansion
|
||||
}
|
||||
|
||||
// webhookConfigs implements WebhookConfigInterface
|
||||
type webhookConfigs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newWebhookConfigs returns a WebhookConfigs
|
||||
func newWebhookConfigs(c *NotificationV2Client) *webhookConfigs {
|
||||
return &webhookConfigs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the webhookConfig, and returns the corresponding webhookConfig object, and an error if there is any.
|
||||
func (c *webhookConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookConfig, err error) {
|
||||
result = &v2.WebhookConfig{}
|
||||
err = c.client.Get().
|
||||
Resource("webhookconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WebhookConfigs that match those selectors.
|
||||
func (c *webhookConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.WebhookConfigList{}
|
||||
err = c.client.Get().
|
||||
Resource("webhookconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested webhookConfigs.
|
||||
func (c *webhookConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("webhookconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a webhookConfig and creates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||
func (c *webhookConfigs) Create(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.CreateOptions) (result *v2.WebhookConfig, err error) {
|
||||
result = &v2.WebhookConfig{}
|
||||
err = c.client.Post().
|
||||
Resource("webhookconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a webhookConfig and updates it. Returns the server's representation of the webhookConfig, and an error, if there is any.
|
||||
func (c *webhookConfigs) Update(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
||||
result = &v2.WebhookConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("webhookconfigs").
|
||||
Name(webhookConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *webhookConfigs) UpdateStatus(ctx context.Context, webhookConfig *v2.WebhookConfig, opts v1.UpdateOptions) (result *v2.WebhookConfig, err error) {
|
||||
result = &v2.WebhookConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("webhookconfigs").
|
||||
Name(webhookConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the webhookConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *webhookConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("webhookconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *webhookConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("webhookconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched webhookConfig.
|
||||
func (c *webhookConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookConfig, err error) {
|
||||
result = &v2.WebhookConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("webhookconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// WebhookReceiversGetter has a method to return a WebhookReceiverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type WebhookReceiversGetter interface {
|
||||
WebhookReceivers() WebhookReceiverInterface
|
||||
}
|
||||
|
||||
// WebhookReceiverInterface has methods to work with WebhookReceiver resources.
|
||||
type WebhookReceiverInterface interface {
|
||||
Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (*v2.WebhookReceiver, error)
|
||||
Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error)
|
||||
UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (*v2.WebhookReceiver, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WebhookReceiver, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WebhookReceiverList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error)
|
||||
WebhookReceiverExpansion
|
||||
}
|
||||
|
||||
// webhookReceivers implements WebhookReceiverInterface
|
||||
type webhookReceivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newWebhookReceivers returns a WebhookReceivers
|
||||
func newWebhookReceivers(c *NotificationV2Client) *webhookReceivers {
|
||||
return &webhookReceivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the webhookReceiver, and returns the corresponding webhookReceiver object, and an error if there is any.
|
||||
func (c *webhookReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WebhookReceiver, err error) {
|
||||
result = &v2.WebhookReceiver{}
|
||||
err = c.client.Get().
|
||||
Resource("webhookreceivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WebhookReceivers that match those selectors.
|
||||
func (c *webhookReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WebhookReceiverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.WebhookReceiverList{}
|
||||
err = c.client.Get().
|
||||
Resource("webhookreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested webhookReceivers.
|
||||
func (c *webhookReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("webhookreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a webhookReceiver and creates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||
func (c *webhookReceivers) Create(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.CreateOptions) (result *v2.WebhookReceiver, err error) {
|
||||
result = &v2.WebhookReceiver{}
|
||||
err = c.client.Post().
|
||||
Resource("webhookreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a webhookReceiver and updates it. Returns the server's representation of the webhookReceiver, and an error, if there is any.
|
||||
func (c *webhookReceivers) Update(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
||||
result = &v2.WebhookReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("webhookreceivers").
|
||||
Name(webhookReceiver.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *webhookReceivers) UpdateStatus(ctx context.Context, webhookReceiver *v2.WebhookReceiver, opts v1.UpdateOptions) (result *v2.WebhookReceiver, err error) {
|
||||
result = &v2.WebhookReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("webhookreceivers").
|
||||
Name(webhookReceiver.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(webhookReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the webhookReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *webhookReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("webhookreceivers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *webhookReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("webhookreceivers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched webhookReceiver.
|
||||
func (c *webhookReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WebhookReceiver, err error) {
|
||||
result = &v2.WebhookReceiver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("webhookreceivers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// WechatConfigsGetter has a method to return a WechatConfigInterface.
|
||||
// A group's client should implement this interface.
|
||||
type WechatConfigsGetter interface {
|
||||
WechatConfigs() WechatConfigInterface
|
||||
}
|
||||
|
||||
// WechatConfigInterface has methods to work with WechatConfig resources.
|
||||
type WechatConfigInterface interface {
|
||||
Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (*v2.WechatConfig, error)
|
||||
Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error)
|
||||
UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (*v2.WechatConfig, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WechatConfig, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WechatConfigList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error)
|
||||
WechatConfigExpansion
|
||||
}
|
||||
|
||||
// wechatConfigs implements WechatConfigInterface
|
||||
type wechatConfigs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newWechatConfigs returns a WechatConfigs
|
||||
func newWechatConfigs(c *NotificationV2Client) *wechatConfigs {
|
||||
return &wechatConfigs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the wechatConfig, and returns the corresponding wechatConfig object, and an error if there is any.
|
||||
func (c *wechatConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatConfig, err error) {
|
||||
result = &v2.WechatConfig{}
|
||||
err = c.client.Get().
|
||||
Resource("wechatconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WechatConfigs that match those selectors.
|
||||
func (c *wechatConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.WechatConfigList{}
|
||||
err = c.client.Get().
|
||||
Resource("wechatconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested wechatConfigs.
|
||||
func (c *wechatConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("wechatconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a wechatConfig and creates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||
func (c *wechatConfigs) Create(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.CreateOptions) (result *v2.WechatConfig, err error) {
|
||||
result = &v2.WechatConfig{}
|
||||
err = c.client.Post().
|
||||
Resource("wechatconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a wechatConfig and updates it. Returns the server's representation of the wechatConfig, and an error, if there is any.
|
||||
func (c *wechatConfigs) Update(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
||||
result = &v2.WechatConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("wechatconfigs").
|
||||
Name(wechatConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *wechatConfigs) UpdateStatus(ctx context.Context, wechatConfig *v2.WechatConfig, opts v1.UpdateOptions) (result *v2.WechatConfig, err error) {
|
||||
result = &v2.WechatConfig{}
|
||||
err = c.client.Put().
|
||||
Resource("wechatconfigs").
|
||||
Name(wechatConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatConfig).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the wechatConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *wechatConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("wechatconfigs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *wechatConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("wechatconfigs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched wechatConfig.
|
||||
func (c *wechatConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatConfig, err error) {
|
||||
result = &v2.WechatConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("wechatconfigs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme"
|
||||
)
|
||||
|
||||
// WechatReceiversGetter has a method to return a WechatReceiverInterface.
|
||||
// A group's client should implement this interface.
|
||||
type WechatReceiversGetter interface {
|
||||
WechatReceivers() WechatReceiverInterface
|
||||
}
|
||||
|
||||
// WechatReceiverInterface has methods to work with WechatReceiver resources.
|
||||
type WechatReceiverInterface interface {
|
||||
Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (*v2.WechatReceiver, error)
|
||||
Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error)
|
||||
UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (*v2.WechatReceiver, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.WechatReceiver, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.WechatReceiverList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error)
|
||||
WechatReceiverExpansion
|
||||
}
|
||||
|
||||
// wechatReceivers implements WechatReceiverInterface
|
||||
type wechatReceivers struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newWechatReceivers returns a WechatReceivers
|
||||
func newWechatReceivers(c *NotificationV2Client) *wechatReceivers {
|
||||
return &wechatReceivers{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the wechatReceiver, and returns the corresponding wechatReceiver object, and an error if there is any.
|
||||
func (c *wechatReceivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.WechatReceiver, err error) {
|
||||
result = &v2.WechatReceiver{}
|
||||
err = c.client.Get().
|
||||
Resource("wechatreceivers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of WechatReceivers that match those selectors.
|
||||
func (c *wechatReceivers) List(ctx context.Context, opts v1.ListOptions) (result *v2.WechatReceiverList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.WechatReceiverList{}
|
||||
err = c.client.Get().
|
||||
Resource("wechatreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested wechatReceivers.
|
||||
func (c *wechatReceivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("wechatreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a wechatReceiver and creates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||
func (c *wechatReceivers) Create(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.CreateOptions) (result *v2.WechatReceiver, err error) {
|
||||
result = &v2.WechatReceiver{}
|
||||
err = c.client.Post().
|
||||
Resource("wechatreceivers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a wechatReceiver and updates it. Returns the server's representation of the wechatReceiver, and an error, if there is any.
|
||||
func (c *wechatReceivers) Update(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
||||
result = &v2.WechatReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("wechatreceivers").
|
||||
Name(wechatReceiver.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *wechatReceivers) UpdateStatus(ctx context.Context, wechatReceiver *v2.WechatReceiver, opts v1.UpdateOptions) (result *v2.WechatReceiver, err error) {
|
||||
result = &v2.WechatReceiver{}
|
||||
err = c.client.Put().
|
||||
Resource("wechatreceivers").
|
||||
Name(wechatReceiver.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(wechatReceiver).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the wechatReceiver and deletes it. Returns an error if one occurs.
|
||||
func (c *wechatReceivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("wechatreceivers").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *wechatReceivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("wechatreceivers").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched wechatReceiver.
|
||||
func (c *wechatReceivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.WechatReceiver, err error) {
|
||||
result = &v2.WechatReceiver{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("wechatreceivers").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -35,6 +35,7 @@ import (
|
||||
iam "kubesphere.io/kubesphere/pkg/client/informers/externalversions/iam"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
network "kubesphere.io/kubesphere/pkg/client/informers/externalversions/network"
|
||||
notification "kubesphere.io/kubesphere/pkg/client/informers/externalversions/notification"
|
||||
quota "kubesphere.io/kubesphere/pkg/client/informers/externalversions/quota"
|
||||
servicemesh "kubesphere.io/kubesphere/pkg/client/informers/externalversions/servicemesh"
|
||||
storage "kubesphere.io/kubesphere/pkg/client/informers/externalversions/storage"
|
||||
@@ -188,6 +189,7 @@ type SharedInformerFactory interface {
|
||||
Devops() devops.Interface
|
||||
Iam() iam.Interface
|
||||
Network() network.Interface
|
||||
Notification() notification.Interface
|
||||
Quota() quota.Interface
|
||||
Servicemesh() servicemesh.Interface
|
||||
Storage() storage.Interface
|
||||
@@ -219,6 +221,10 @@ func (f *sharedInformerFactory) Network() network.Interface {
|
||||
return network.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Notification() notification.Interface {
|
||||
return notification.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Quota() quota.Interface {
|
||||
return quota.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import (
|
||||
v1alpha3 "kubesphere.io/kubesphere/pkg/apis/devops/v1alpha3"
|
||||
v1alpha2 "kubesphere.io/kubesphere/pkg/apis/iam/v1alpha2"
|
||||
networkv1alpha1 "kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
quotav1alpha2 "kubesphere.io/kubesphere/pkg/apis/quota/v1alpha2"
|
||||
servicemeshv1alpha2 "kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"
|
||||
storagev1alpha1 "kubesphere.io/kubesphere/pkg/apis/storage/v1alpha1"
|
||||
@@ -132,6 +133,28 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case networkv1alpha1.SchemeGroupVersion.WithResource("namespacenetworkpolicies"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Network().V1alpha1().NamespaceNetworkPolicies().Informer()}, nil
|
||||
|
||||
// Group=notification.kubesphere.io, Version=v2
|
||||
case v2.SchemeGroupVersion.WithResource("dingtalkconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().DingTalkConfigs().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("dingtalkreceivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().DingTalkReceivers().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("emailconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().EmailConfigs().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("emailreceivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().EmailReceivers().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("slackconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().SlackConfigs().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("slackreceivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().SlackReceivers().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("webhookconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WebhookConfigs().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("webhookreceivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WebhookReceivers().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("wechatconfigs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WechatConfigs().Informer()}, nil
|
||||
case v2.SchemeGroupVersion.WithResource("wechatreceivers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Notification().V2().WechatReceivers().Informer()}, nil
|
||||
|
||||
// Group=quota.kubesphere.io, Version=v1alpha2
|
||||
case quotav1alpha2.SchemeGroupVersion.WithResource("resourcequotas"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Quota().V1alpha2().ResourceQuotas().Informer()}, nil
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package notification
|
||||
|
||||
import (
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/informers/externalversions/notification/v2"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V2 provides access to shared informers for resources in V2.
|
||||
V2() v2.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V2 returns a new v2.Interface.
|
||||
func (g *group) V2() v2.Interface {
|
||||
return v2.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// DingTalkConfigInformer provides access to a shared informer and lister for
|
||||
// DingTalkConfigs.
|
||||
type DingTalkConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.DingTalkConfigLister
|
||||
}
|
||||
|
||||
type dingTalkConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewDingTalkConfigInformer constructs a new informer for DingTalkConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDingTalkConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDingTalkConfigInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDingTalkConfigInformer constructs a new informer for DingTalkConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDingTalkConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().DingTalkConfigs().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().DingTalkConfigs().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.DingTalkConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *dingTalkConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDingTalkConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *dingTalkConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.DingTalkConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *dingTalkConfigInformer) Lister() v2.DingTalkConfigLister {
|
||||
return v2.NewDingTalkConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// DingTalkReceiverInformer provides access to a shared informer and lister for
|
||||
// DingTalkReceivers.
|
||||
type DingTalkReceiverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.DingTalkReceiverLister
|
||||
}
|
||||
|
||||
type dingTalkReceiverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewDingTalkReceiverInformer constructs a new informer for DingTalkReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDingTalkReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDingTalkReceiverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDingTalkReceiverInformer constructs a new informer for DingTalkReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDingTalkReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().DingTalkReceivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().DingTalkReceivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.DingTalkReceiver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *dingTalkReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDingTalkReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *dingTalkReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.DingTalkReceiver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *dingTalkReceiverInformer) Lister() v2.DingTalkReceiverLister {
|
||||
return v2.NewDingTalkReceiverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// EmailConfigInformer provides access to a shared informer and lister for
|
||||
// EmailConfigs.
|
||||
type EmailConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.EmailConfigLister
|
||||
}
|
||||
|
||||
type emailConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewEmailConfigInformer constructs a new informer for EmailConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewEmailConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredEmailConfigInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredEmailConfigInformer constructs a new informer for EmailConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredEmailConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().EmailConfigs().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().EmailConfigs().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.EmailConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *emailConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredEmailConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *emailConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.EmailConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *emailConfigInformer) Lister() v2.EmailConfigLister {
|
||||
return v2.NewEmailConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// EmailReceiverInformer provides access to a shared informer and lister for
|
||||
// EmailReceivers.
|
||||
type EmailReceiverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.EmailReceiverLister
|
||||
}
|
||||
|
||||
type emailReceiverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewEmailReceiverInformer constructs a new informer for EmailReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewEmailReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredEmailReceiverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredEmailReceiverInformer constructs a new informer for EmailReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredEmailReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().EmailReceivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().EmailReceivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.EmailReceiver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *emailReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredEmailReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *emailReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.EmailReceiver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *emailReceiverInformer) Lister() v2.EmailReceiverLister {
|
||||
return v2.NewEmailReceiverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// DingTalkConfigs returns a DingTalkConfigInformer.
|
||||
DingTalkConfigs() DingTalkConfigInformer
|
||||
// DingTalkReceivers returns a DingTalkReceiverInformer.
|
||||
DingTalkReceivers() DingTalkReceiverInformer
|
||||
// EmailConfigs returns a EmailConfigInformer.
|
||||
EmailConfigs() EmailConfigInformer
|
||||
// EmailReceivers returns a EmailReceiverInformer.
|
||||
EmailReceivers() EmailReceiverInformer
|
||||
// SlackConfigs returns a SlackConfigInformer.
|
||||
SlackConfigs() SlackConfigInformer
|
||||
// SlackReceivers returns a SlackReceiverInformer.
|
||||
SlackReceivers() SlackReceiverInformer
|
||||
// WebhookConfigs returns a WebhookConfigInformer.
|
||||
WebhookConfigs() WebhookConfigInformer
|
||||
// WebhookReceivers returns a WebhookReceiverInformer.
|
||||
WebhookReceivers() WebhookReceiverInformer
|
||||
// WechatConfigs returns a WechatConfigInformer.
|
||||
WechatConfigs() WechatConfigInformer
|
||||
// WechatReceivers returns a WechatReceiverInformer.
|
||||
WechatReceivers() WechatReceiverInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// DingTalkConfigs returns a DingTalkConfigInformer.
|
||||
func (v *version) DingTalkConfigs() DingTalkConfigInformer {
|
||||
return &dingTalkConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// DingTalkReceivers returns a DingTalkReceiverInformer.
|
||||
func (v *version) DingTalkReceivers() DingTalkReceiverInformer {
|
||||
return &dingTalkReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// EmailConfigs returns a EmailConfigInformer.
|
||||
func (v *version) EmailConfigs() EmailConfigInformer {
|
||||
return &emailConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// EmailReceivers returns a EmailReceiverInformer.
|
||||
func (v *version) EmailReceivers() EmailReceiverInformer {
|
||||
return &emailReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// SlackConfigs returns a SlackConfigInformer.
|
||||
func (v *version) SlackConfigs() SlackConfigInformer {
|
||||
return &slackConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// SlackReceivers returns a SlackReceiverInformer.
|
||||
func (v *version) SlackReceivers() SlackReceiverInformer {
|
||||
return &slackReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// WebhookConfigs returns a WebhookConfigInformer.
|
||||
func (v *version) WebhookConfigs() WebhookConfigInformer {
|
||||
return &webhookConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// WebhookReceivers returns a WebhookReceiverInformer.
|
||||
func (v *version) WebhookReceivers() WebhookReceiverInformer {
|
||||
return &webhookReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// WechatConfigs returns a WechatConfigInformer.
|
||||
func (v *version) WechatConfigs() WechatConfigInformer {
|
||||
return &wechatConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// WechatReceivers returns a WechatReceiverInformer.
|
||||
func (v *version) WechatReceivers() WechatReceiverInformer {
|
||||
return &wechatReceiverInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// SlackConfigInformer provides access to a shared informer and lister for
|
||||
// SlackConfigs.
|
||||
type SlackConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.SlackConfigLister
|
||||
}
|
||||
|
||||
type slackConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewSlackConfigInformer constructs a new informer for SlackConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewSlackConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredSlackConfigInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredSlackConfigInformer constructs a new informer for SlackConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredSlackConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().SlackConfigs().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().SlackConfigs().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.SlackConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *slackConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredSlackConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *slackConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.SlackConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *slackConfigInformer) Lister() v2.SlackConfigLister {
|
||||
return v2.NewSlackConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// SlackReceiverInformer provides access to a shared informer and lister for
|
||||
// SlackReceivers.
|
||||
type SlackReceiverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.SlackReceiverLister
|
||||
}
|
||||
|
||||
type slackReceiverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewSlackReceiverInformer constructs a new informer for SlackReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewSlackReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredSlackReceiverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredSlackReceiverInformer constructs a new informer for SlackReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredSlackReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().SlackReceivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().SlackReceivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.SlackReceiver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *slackReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredSlackReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *slackReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.SlackReceiver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *slackReceiverInformer) Lister() v2.SlackReceiverLister {
|
||||
return v2.NewSlackReceiverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// WebhookConfigInformer provides access to a shared informer and lister for
|
||||
// WebhookConfigs.
|
||||
type WebhookConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.WebhookConfigLister
|
||||
}
|
||||
|
||||
type webhookConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewWebhookConfigInformer constructs a new informer for WebhookConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewWebhookConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredWebhookConfigInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredWebhookConfigInformer constructs a new informer for WebhookConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredWebhookConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WebhookConfigs().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WebhookConfigs().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.WebhookConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *webhookConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredWebhookConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *webhookConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.WebhookConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *webhookConfigInformer) Lister() v2.WebhookConfigLister {
|
||||
return v2.NewWebhookConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// WebhookReceiverInformer provides access to a shared informer and lister for
|
||||
// WebhookReceivers.
|
||||
type WebhookReceiverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.WebhookReceiverLister
|
||||
}
|
||||
|
||||
type webhookReceiverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewWebhookReceiverInformer constructs a new informer for WebhookReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewWebhookReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredWebhookReceiverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredWebhookReceiverInformer constructs a new informer for WebhookReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredWebhookReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WebhookReceivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WebhookReceivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.WebhookReceiver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *webhookReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredWebhookReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *webhookReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.WebhookReceiver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *webhookReceiverInformer) Lister() v2.WebhookReceiverLister {
|
||||
return v2.NewWebhookReceiverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// WechatConfigInformer provides access to a shared informer and lister for
|
||||
// WechatConfigs.
|
||||
type WechatConfigInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.WechatConfigLister
|
||||
}
|
||||
|
||||
type wechatConfigInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewWechatConfigInformer constructs a new informer for WechatConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewWechatConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredWechatConfigInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredWechatConfigInformer constructs a new informer for WechatConfig type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredWechatConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WechatConfigs().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WechatConfigs().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.WechatConfig{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *wechatConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredWechatConfigInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *wechatConfigInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.WechatConfig{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *wechatConfigInformer) Lister() v2.WechatConfigLister {
|
||||
return v2.NewWechatConfigLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
notificationv2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned"
|
||||
internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "kubesphere.io/kubesphere/pkg/client/listers/notification/v2"
|
||||
)
|
||||
|
||||
// WechatReceiverInformer provides access to a shared informer and lister for
|
||||
// WechatReceivers.
|
||||
type WechatReceiverInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.WechatReceiverLister
|
||||
}
|
||||
|
||||
type wechatReceiverInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewWechatReceiverInformer constructs a new informer for WechatReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewWechatReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredWechatReceiverInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredWechatReceiverInformer constructs a new informer for WechatReceiver type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredWechatReceiverInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WechatReceivers().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NotificationV2().WechatReceivers().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
¬ificationv2.WechatReceiver{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *wechatReceiverInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredWechatReceiverInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *wechatReceiverInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(¬ificationv2.WechatReceiver{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *wechatReceiverInformer) Lister() v2.WechatReceiverLister {
|
||||
return v2.NewWechatReceiverLister(f.Informer().GetIndexer())
|
||||
}
|
||||
65
pkg/client/listers/notification/v2/dingtalkconfig.go
Normal file
65
pkg/client/listers/notification/v2/dingtalkconfig.go
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2020 The KubeSphere Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
v2 "kubesphere.io/kubesphere/pkg/apis/notification/v2"
|
||||
)
|
||||
|
||||
// DingTalkConfigLister helps list DingTalkConfigs.
|
||||
type DingTalkConfigLister interface {
|
||||
// List lists all DingTalkConfigs in the indexer.
|
||||
List(selector labels.Selector) (ret []*v2.DingTalkConfig, err error)
|
||||
// Get retrieves the DingTalkConfig from the index for a given name.
|
||||
Get(name string) (*v2.DingTalkConfig, error)
|
||||
DingTalkConfigListerExpansion
|
||||
}
|
||||
|
||||
// dingTalkConfigLister implements the DingTalkConfigLister interface.
|
||||
type dingTalkConfigLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewDingTalkConfigLister returns a new DingTalkConfigLister.
|
||||
func NewDingTalkConfigLister(indexer cache.Indexer) DingTalkConfigLister {
|
||||
return &dingTalkConfigLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all DingTalkConfigs in the indexer.
|
||||
func (s *dingTalkConfigLister) List(selector labels.Selector) (ret []*v2.DingTalkConfig, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v2.DingTalkConfig))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the DingTalkConfig from the index for a given name.
|
||||
func (s *dingTalkConfigLister) Get(name string) (*v2.DingTalkConfig, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v2.Resource("dingtalkconfig"), name)
|
||||
}
|
||||
return obj.(*v2.DingTalkConfig), nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user