postgres: kubedb.dev/postgres/pkg/controller Index | Files

package controller

import "kubedb.dev/postgres/pkg/controller"

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.

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

Package Files

appbinding.go config.go configmap.go controller.go dormant_database.go job.go monitor.go postgres.go rbac.go secret.go service.go snapshot.go statefulset.go wal.go workqueue.go

Constants

const (
    PostgresUser     = "POSTGRES_USER"
    PostgresPassword = "POSTGRES_PASSWORD"
)
const (
    PostgresPort     = 5432
    PostgresPortName = "api"
)

Variables

var (
    NodeRole = "kubedb.com/role"
)

func WalDataDir Uses

func WalDataDir(postgres *api.Postgres) string

type Controller Uses

type Controller struct {
    amc.Config
    *amc.Controller
    // contains filtered or unexported fields
}

func New Uses

func New(
    clientConfig *rest.Config,
    client kubernetes.Interface,
    apiExtKubeClient crd_cs.ApiextensionsV1beta1Interface,
    extClient cs.Interface,
    stashClient scs.Interface,
    dc dynamic.Interface,
    appCatalogClient appcat_cs.Interface,
    promClient pcm.MonitoringV1Interface,
    cronController snapc.CronControllerInterface,
    opt amc.Config,
    recorder record.EventRecorder,
) *Controller

func (*Controller) CheckStatefulSetPodStatus Uses

func (c *Controller) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) error

func (*Controller) EnsureCustomResourceDefinitions Uses

func (c *Controller) EnsureCustomResourceDefinitions() error

Ensuring Custom Resource Definitions

func (*Controller) GetDatabase Uses

func (c *Controller) GetDatabase(meta metav1.ObjectMeta) (runtime.Object, error)

func (*Controller) GetSnapshotter Uses

func (c *Controller) GetSnapshotter(snapshot *api.Snapshot) (*batch.Job, error)

func (*Controller) Init Uses

func (c *Controller) Init() error

InitInformer initializes Postgres, DormantDB amd Snapshot watcher

func (*Controller) Run Uses

func (c *Controller) Run(stopCh <-chan struct{})

Blocks caller. Intended to be called as a Go routine.

func (*Controller) RunControllers Uses

func (c *Controller) RunControllers(stopCh <-chan struct{})

RunControllers runs queue.worker

func (*Controller) SetDatabaseStatus Uses

func (c *Controller) SetDatabaseStatus(meta metav1.ObjectMeta, phase api.DatabasePhase, reason string) error

func (*Controller) StartAndRunControllers Uses

func (c *Controller) StartAndRunControllers(stopCh <-chan struct{})

StartAndRunControllers starts InformetFactory and runs queue.worker

func (*Controller) UpsertDatabaseAnnotation Uses

func (c *Controller) UpsertDatabaseAnnotation(meta metav1.ObjectMeta, annotation map[string]string) error

func (*Controller) ValidateSnapshot Uses

func (c *Controller) ValidateSnapshot(snapshot *api.Snapshot) error

func (*Controller) WaitUntilPaused Uses

func (c *Controller) WaitUntilPaused(drmn *api.DormantDatabase) error

WaitUntilPaused is an Interface of *amc.Controller

func (*Controller) WipeOutDatabase Uses

func (c *Controller) WipeOutDatabase(drmn *api.DormantDatabase) error

WipeOutDatabase is an Interface of *amc.Controller. It verifies and deletes secrets and other left overs of DBs except Snapshot and PVC.

func (*Controller) WipeOutSnapshot Uses

func (c *Controller) WipeOutSnapshot(snapshot *api.Snapshot) error

type OperatorConfig Uses

type OperatorConfig struct {
    amc.Config

    ClientConfig     *rest.Config
    KubeClient       kubernetes.Interface
    APIExtKubeClient crd_cs.ApiextensionsV1beta1Interface
    DBClient         cs.Interface
    StashClient      scs.Interface
    AppCatalogClient appcat_cs.Interface
    DynamicClient    dynamic.Interface
    PromClient       pcm.MonitoringV1Interface
    CronController   snapc.CronControllerInterface
}

func NewOperatorConfig Uses

func NewOperatorConfig(clientConfig *rest.Config) *OperatorConfig

func (*OperatorConfig) New Uses

func (c *OperatorConfig) New() (*Controller, error)

Package controller imports 66 packages (graph) and is imported by 8 packages. Updated 2019-10-31. Refresh now. Tools for package owners.