-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to CRDs - WIP #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a very brief look at this; clearly a lot of WIP and just a couple of comments for now.
log.Printf("Starting the Cmd.") | ||
|
||
// Start the Cmd | ||
log.Fatal(mgr.Start(signals.SetupSignalHandler())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If SIGTERM
is received does Start() return? If so, I wouldn't expect that to print a fatal error.
Invoking: $ make build DBG=1 or $ make aws-actuator DBG=1 will build cmd/cluster-controller, cmd/machine-controller and bin/aws-actuator with Go debug support. The build rules for those three binaries are now `go build $(GOGCFLAGS) ...`. The default value for GOGCFLAGS is -gcflags=all="-N -l", assuming GOGCFLAGS it not already set in your environment. "all" specifies that the flags should be applied to all packages (and may rebuild existing up to date packages); "-N" disables compiler optimisations and "-l" prevents inlining. So, to override the defaults: $ make build DBG=1 GOGCFLAGS='-gcflags="-N -l"'
Makefile: add Go debug support for local binaries
unify clusterid retrieval
remove unused controllers
60e5b11
to
320f710
Compare
/test images |
log.Printf("Registering Components.") | ||
|
||
// Setup Scheme for all resources | ||
if err := apis.AddToScheme(mgr.GetScheme()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice.
package controller | ||
|
||
import ( | ||
"sigs.k8s.io/cluster-api-provider-aws/migration/pkg/controller/awsmachineproviderconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where can I find this migration
dir?
cmd/manager/main.go
Outdated
) | ||
|
||
func init() { | ||
pflag.CommandLine.StringVar(&logLevel, "log-level", defaultLogLevel, "Log level (debug,info,warn,error,fatal)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use flag
since sigs.k8s.io/controller-runtime
defines its own flags which gets ignored by pflag
.
const ( | ||
// ClusterNameLabel is the label that a machineset must have to identify the | ||
// cluster to which it belongs. | ||
ClusterNameLabel = "sigs.k8s.io/cluster-api-cluster" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are those labels community defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a carry over, there's bunch of things to consolidate after this. Let's address any non specific to CRDs move in different follow ups
kubernetes-sigs/cluster-api#546 is definitely blocker |
/test e2e |
@enxebre: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
/test e2e |
/test e2e |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
* Adds simple Exists implementation to machine actuator Remove the machine actuator test for now. Trying to test it will be possible, but it will be a *ton* of work and right now it's not worth the effort. Exports the ec2 service's EC2 field. Signed-off-by: Chuck Ha <chuck@heptio.com> * Update deps Signed-off-by: Chuck Ha <chuck@heptio.com>
Migrate to CRDs:
-- kubebuilder init --domain k8s.io --license apache2 --owner “The Kubernetes Authors”
-- kubebuilder create api --group awsproviderconfig --version v1alpha1 --kind AWSMachineProviderConfig
pkg/cloud
tests/
andcmd/aws-actuator
How to run it:
kustomize build vendor/sigs.k8s.io/cluster-api/config/default/ >> cluster-api-bootstrap.yaml
kubectl apply -f cluster-api-bootstrap.yaml
make manager
./bin/manager
How to regenerate code:
go generate ./pkg/... ./cmd/...