Documentation ¶
Overview ¶
Copyright The Pharmer 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 Pharmer 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 Pharmer 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 Pharmer 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 ¶
- Variables
- func CreateConfigMap(kc kubernetes.Interface, name, namespace string, data map[string]string) error
- func CreateCredentialSecret(client kubernetes.Interface, cloudProvider, namespace string, ...) error
- func CreateNamespace(kc kubernetes.Interface, namespace string) error
- func CreateSecret(kc kubernetes.Interface, name, namespace string, data map[string][]byte) error
- func CreateValidKubeadmToken(kc kubernetes.Interface, duration time.Duration) (string, error)
- func GetAdminConfig(cluster *api.Cluster, caCertPair *certificates.CertKeyPair) (*api.KubeConfig, error)
- func GetBooststrapClient(cluster *api.Cluster, caCert *certificates.CertKeyPair) (clusterclient.Client, error)
- func GetClusterAPIClient(certStore store.CertificateStore, clusterEndpoint string) (clientset.Interface, error)
- func GetExistingKubeadmToken(kc kubernetes.Interface, duration time.Duration) (string, error)
- func GetKubeadmToken() string
- func NewAdminClient(certStore store.CertificateStore, clusterEndpoint string) (kubernetes.Interface, error)
- func NewRestConfig(certStore store.CertificateStore, clusterEndpoint string) (*rest.Config, error)
- func NewRestConfigFromKubeConfig(in *api.KubeConfig) *rest.Config
- func ParseToken(s string) (string, string, error)
- func RandStringRunes(n int) string
- func WaitForReadyMaster(log logr.Logger, client kubernetes.Interface) error
- func WaitForReadyMasterVersion(client kubernetes.Interface, desiredVersion *semver.Version) error
Constants ¶
This section is empty.
Variables ¶
var ( // TokenIDRegexpString defines token's id regular expression pattern TokenIDRegexpString = "^([a-z0-9]{6})$" // TokenIDRegexp is a compiled regular expression of TokenIDRegexpString TokenIDRegexp = regexp.MustCompile(TokenIDRegexpString) // TokenRegexpString defines id.secret regular expression pattern TokenRegexpString = "^([a-z0-9]{6})\\.([a-z0-9]{16})$" // TokenRegexp is a compiled regular expression of TokenRegexpString TokenRegexp = regexp.MustCompile(TokenRegexpString) )
Functions ¶
func CreateConfigMap ¶
func CreateCredentialSecret ¶
func CreateNamespace ¶
func CreateNamespace(kc kubernetes.Interface, namespace string) error
func CreateSecret ¶
func CreateValidKubeadmToken ¶
func GetAdminConfig ¶
func GetAdminConfig(cluster *api.Cluster, caCertPair *certificates.CertKeyPair) (*api.KubeConfig, error)
func GetBooststrapClient ¶
func GetBooststrapClient(cluster *api.Cluster, caCert *certificates.CertKeyPair) (clusterclient.Client, error)
func GetClusterAPIClient ¶
func GetExistingKubeadmToken ¶
func GetKubeadmToken ¶
func GetKubeadmToken() string
func NewAdminClient ¶
func NewAdminClient(certStore store.CertificateStore, clusterEndpoint string) (kubernetes.Interface, error)
WARNING: Returned KubeClient uses admin client cert. This should only be used for Cluster provisioning operations.
func NewRestConfig ¶
func NewRestConfigFromKubeConfig ¶
func NewRestConfigFromKubeConfig(in *api.KubeConfig) *rest.Config
func RandStringRunes ¶
func WaitForReadyMaster ¶
func WaitForReadyMaster(log logr.Logger, client kubernetes.Interface) error
func WaitForReadyMasterVersion ¶
func WaitForReadyMasterVersion(client kubernetes.Interface, desiredVersion *semver.Version) error
Types ¶
This section is empty.