This repository has been archived by the owner on Mar 24, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
271 changed files
with
20,130 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ | |
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
bin/* | ||
provider-components.yaml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# cluster-api-provider-bare-metal | ||
# cluster-api-provider-baremetal |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
Copyright 2019 The Kubernetes 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 machine | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"log" | ||
|
||
clusterv1 "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1" | ||
client "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1" | ||
) | ||
|
||
const ( | ||
ProviderName = "solas" | ||
) | ||
|
||
// Actuator is responsible for performing machine reconciliation | ||
type Actuator struct { | ||
machinesGetter client.MachinesGetter | ||
} | ||
|
||
// ActuatorParams holds parameter information for Actuator | ||
type ActuatorParams struct { | ||
MachinesGetter client.MachinesGetter | ||
} | ||
|
||
// NewActuator creates a new Actuator | ||
func NewActuator(params ActuatorParams) (*Actuator, error) { | ||
return &Actuator{ | ||
machinesGetter: params.MachinesGetter, | ||
}, nil | ||
} | ||
|
||
// Create creates a machine and is invoked by the Machine Controller | ||
func (a *Actuator) Create(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { | ||
log.Printf("Creating machine %v for cluster %v.", machine.Name, cluster.Name) | ||
return fmt.Errorf("TODO: Not yet implemented") | ||
} | ||
|
||
// Delete deletes a machine and is invoked by the Machine Controller | ||
func (a *Actuator) Delete(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { | ||
log.Printf("Deleting machine %v for cluster %v.", machine.Name, cluster.Name) | ||
return fmt.Errorf("TODO: Not yet implemented") | ||
} | ||
|
||
// Update updates a machine and is invoked by the Machine Controller | ||
func (a *Actuator) Update(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { | ||
log.Printf("Updating machine %v for cluster %v.", machine.Name, cluster.Name) | ||
return fmt.Errorf("TODO: Not yet implemented") | ||
} | ||
|
||
// Exists tests for the existence of a machine and is invoked by the Machine Controller | ||
func (a *Actuator) Exists(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) { | ||
log.Printf("Checking if machine %v for cluster %v exists.", machine.Name, cluster.Name) | ||
return false, fmt.Errorf("TODO: Not yet implemented") | ||
} | ||
|
||
// The Machine Actuator interface must implement GetIP and GetKubeConfig functions as a workaround for issues | ||
// cluster-api#158 (https://github.com/kubernetes-sigs/cluster-api/issues/158) and cluster-api#160 | ||
// (https://github.com/kubernetes-sigs/cluster-api/issues/160). | ||
|
||
// GetIP returns IP address of the machine in the cluster. | ||
func (a *Actuator) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error) { | ||
log.Printf("Getting IP of machine %v for cluster %v.", machine.Name, cluster.Name) | ||
return "", fmt.Errorf("TODO: Not yet implemented") | ||
} | ||
|
||
// GetKubeConfig gets a kubeconfig from the running control plane. | ||
func (a *Actuator) GetKubeConfig(cluster *clusterv1.Cluster, controlPlaneMachine *clusterv1.Machine) (string, error) { | ||
log.Printf("Getting IP of machine %v for cluster %v.", controlPlaneMachine.Name, cluster.Name) | ||
return "", fmt.Errorf("TODO: Not yet implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright 2019 The Kubernetes 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 controller | ||
|
||
import ( | ||
"github.com/metalkube/cluster-api-provider-baremetal/pkg/cloud/baremetal/actuators/machine" | ||
capimachine "sigs.k8s.io/cluster-api/pkg/controller/machine" | ||
"sigs.k8s.io/controller-runtime/pkg/manager" | ||
) | ||
|
||
//+kubebuilder:rbac:groups=baremetal.k8s.io,resources=baremetalmachineproviderspecs;baremetalmachineproviderstatuses,verbs=get;list;watch;create;update;patch;delete | ||
func init() { | ||
// AddToManagerFuncs is a list of functions to create controllers and add them to a manager. | ||
AddToManagerFuncs = append(AddToManagerFuncs, func(m manager.Manager) error { | ||
return capimachine.AddWithActuator(m, &machine.Actuator{}) | ||
}) | ||
} |
24 changes: 24 additions & 0 deletions
24
vendor/sigs.k8s.io/cluster-api/.github/ISSUE_TEMPLATE/bug_report.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
vendor/sigs.k8s.io/cluster-api/.github/ISSUE_TEMPLATE/feature_request.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.