Documentation ¶
Overview ¶
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Copyright The KubeDB 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.
Index ¶
- Constants
- Variables
- func AssertSlotsEqual(slots, wanted []rd.ClusterSlot) error
- func Sync(addrs [][]string, redis *api.Redis) ([][]RedisNode, [][]*rd.Client)
- type ClusterScenario
- type Framework
- func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error
- func (f *Framework) CleanRedis()
- func (f *Framework) CreateNamespace() error
- func (f *Framework) CreateRedis(obj *api.Redis) error
- func (f *Framework) CreateRole(obj *rbac.Role) error
- func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error
- func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error
- func (f *Framework) DeleteNamespace() error
- func (f *Framework) DeleteRedis(meta metav1.ObjectMeta) error
- func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyCRD() GomegaAsyncAssertion
- func (f *Framework) EventuallyGetItem(meta metav1.ObjectMeta, key string) GomegaAsyncAssertion
- func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyRedis(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyRedisConfig(meta metav1.ObjectMeta, config string) GomegaAsyncAssertion
- func (f *Framework) EventuallyRedisPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyRedisRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallySetItem(meta metav1.ObjectMeta, key, value string) GomegaAsyncAssertion
- func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error
- func (f *Framework) GetDatabasePod(meta metav1.ObjectMeta) (*core.Pod, error)
- func (f *Framework) GetPodsIPWithTunnel(redis *api.Redis) ([][]string, [][]*portforward.Tunnel, error)
- func (f *Framework) GetRedis(meta metav1.ObjectMeta) (*api.Redis, error)
- func (f *Framework) GetRedisClient(meta metav1.ObjectMeta) (*redis.Client, error)
- func (f *Framework) Invoke() *Invocation
- func (f *Framework) Namespace() string
- func (f *Framework) PatchRedis(meta metav1.ObjectMeta, transform func(*api.Redis) *api.Redis) (*api.Redis, error)
- func (f *Framework) PrintDebugHelpers()
- func (f *Framework) RedisClusterOptions() *rd.ClusterOptions
- func (f *Framework) WaitUntilRedisClusterConfigured(redis *api.Redis, port string) error
- func (f *Framework) WaitUntilStatefulSetReady(redis *api.Redis) error
- type Invocation
- func (fi *Invocation) CreateConfigMap(obj *core.ConfigMap) error
- func (fi *Invocation) DeleteConfigMap(meta metav1.ObjectMeta) error
- func (fi *Invocation) ExtClient() cs.Interface
- func (fi *Invocation) GetCustomConfig(configs []string) *core.ConfigMap
- func (fi *Invocation) GetPod(meta metav1.ObjectMeta) (*core.Pod, error)
- func (fi *Invocation) Redis() *api.Redis
- func (fi *Invocation) RedisCluster() *api.Redis
- func (fi *Invocation) RestConfig() *rest.Config
- func (fi *Invocation) RoleBinding(saName string, roleName string) *rbac.RoleBinding
- func (fi *Invocation) RoleForElasticsearch(meta metav1.ObjectMeta) *rbac.Role
- func (fi *Invocation) RoleForSnapshot(meta metav1.ObjectMeta) *rbac.Role
- func (fi *Invocation) ServiceAccount() *core.ServiceAccount
- type RedisNode
Constants ¶
const ( GET = "get" LIST = "list" PATCH = "patch" CREATE = "create" UPDATE = "update" USE = "use" POLICY = "policy" Role = "Role" ServiceAccount = "ServiceAccount" )
Variables ¶
var ( DockerRegistry = "kubedbci" DBCatalogName = "4.0-v2" Cluster = true )
Functions ¶
func AssertSlotsEqual ¶
func AssertSlotsEqual(slots, wanted []rd.ClusterSlot) error
Types ¶
type ClusterScenario ¶
func (*ClusterScenario) Addrs ¶
func (s *ClusterScenario) Addrs() []string
func (*ClusterScenario) ClusterClient ¶
func (s *ClusterScenario) ClusterClient(opt *rd.ClusterOptions) *rd.ClusterClient
func (*ClusterScenario) ClusterNodes ¶
func (s *ClusterScenario) ClusterNodes(slotStart, slotEnd int) []rd.ClusterNode
type Framework ¶
type Framework struct { StorageClass string // contains filtered or unexported fields }
func (*Framework) CheckAppBindingSpec ¶
func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error
func (*Framework) CleanRedis ¶
func (f *Framework) CleanRedis()
func (*Framework) CreateNamespace ¶
func (*Framework) CreateRoleBinding ¶
func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error
func (*Framework) CreateServiceAccount ¶
func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error
func (*Framework) DeleteNamespace ¶
func (*Framework) DeleteRedis ¶
func (f *Framework) DeleteRedis(meta metav1.ObjectMeta) error
func (*Framework) EventuallyAppBinding ¶
func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyCRD ¶
func (f *Framework) EventuallyCRD() GomegaAsyncAssertion
func (*Framework) EventuallyGetItem ¶
func (f *Framework) EventuallyGetItem(meta metav1.ObjectMeta, key string) GomegaAsyncAssertion
func (*Framework) EventuallyPVCCount ¶
func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyRedis ¶
func (f *Framework) EventuallyRedis(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyRedisConfig ¶
func (f *Framework) EventuallyRedisConfig(meta metav1.ObjectMeta, config string) GomegaAsyncAssertion
func (*Framework) EventuallyRedisPhase ¶
func (f *Framework) EventuallyRedisPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyRedisRunning ¶
func (f *Framework) EventuallyRedisRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallySetItem ¶
func (f *Framework) EventuallySetItem(meta metav1.ObjectMeta, key, value string) GomegaAsyncAssertion
func (*Framework) EventuallyWipedOut ¶
func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EvictPodsFromStatefulSet ¶
func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error
func (*Framework) GetDatabasePod ¶
func (*Framework) GetPodsIPWithTunnel ¶
func (*Framework) GetRedisClient ¶
func (*Framework) Invoke ¶
func (f *Framework) Invoke() *Invocation
func (*Framework) PatchRedis ¶
func (*Framework) PrintDebugHelpers ¶
func (f *Framework) PrintDebugHelpers()
func (*Framework) RedisClusterOptions ¶
func (f *Framework) RedisClusterOptions() *rd.ClusterOptions
func (*Framework) WaitUntilRedisClusterConfigured ¶
type Invocation ¶
type Invocation struct { *Framework // contains filtered or unexported fields }
func (*Invocation) CreateConfigMap ¶
func (fi *Invocation) CreateConfigMap(obj *core.ConfigMap) error
func (*Invocation) DeleteConfigMap ¶
func (fi *Invocation) DeleteConfigMap(meta metav1.ObjectMeta) error
func (*Invocation) ExtClient ¶
func (fi *Invocation) ExtClient() cs.Interface
func (*Invocation) GetCustomConfig ¶
func (fi *Invocation) GetCustomConfig(configs []string) *core.ConfigMap
func (*Invocation) GetPod ¶
func (fi *Invocation) GetPod(meta metav1.ObjectMeta) (*core.Pod, error)
func (*Invocation) Redis ¶
func (fi *Invocation) Redis() *api.Redis
func (*Invocation) RedisCluster ¶
func (fi *Invocation) RedisCluster() *api.Redis
func (*Invocation) RestConfig ¶
func (fi *Invocation) RestConfig() *rest.Config
func (*Invocation) RoleBinding ¶
func (fi *Invocation) RoleBinding(saName string, roleName string) *rbac.RoleBinding
func (*Invocation) RoleForElasticsearch ¶
func (fi *Invocation) RoleForElasticsearch(meta metav1.ObjectMeta) *rbac.Role
func (*Invocation) RoleForSnapshot ¶
func (fi *Invocation) RoleForSnapshot(meta metav1.ObjectMeta) *rbac.Role
func (*Invocation) ServiceAccount ¶
func (fi *Invocation) ServiceAccount() *core.ServiceAccount