Skip to content

Commit b55f066

Browse files
awesomenixk8s-ci-robot
authored andcommitted
fix: New Compute and Network micro services convering machine, cluster to pure ARM calls (#139)
fix: New Compute and Network micro services convering machine, cluster to pure ARM calls fix: New Network services which can be used by top level reconciler Add Virtual Machine and Virtual Machine Extensions as well, unforunately this is a massive PR Atleast create single node clusters Add Azure Cloud provider config to all masters and client Use Internal LB IP for nodes to communicate with Control plane Move all defaults to a separate file under services Minor fix to remove any accidental tabs present in yaml file used in startup script Move AdminKubeconfig and DiscoveryHashes back to ClusterConfig, since kubeadm uses on disk certificates, we only update if the spec certs are empty, causing mismatch Address review comments, convert spec to an defined interface and use ref rather than value
1 parent 3370274 commit b55f066

File tree

162 files changed

+22732
-2889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+22732
-2889
lines changed

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/clu
2828
FROM alpine:3.9
2929
WORKDIR /root/
3030
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-azure/manager .
31-
COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure/services/resources/template/deployment-template.json .
3231
ENTRYPOINT ["./manager"]

Gopkg.lock

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/clusterctl/examples/azure/generate-yaml.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ CREDENTIALS_FILE=${OUTPUT_DIR}/credentials.sh
4747
CLUSTER_TEMPLATE_FILE=${DIR}/cluster.yaml.template
4848
CLUSTER_GENERATED_FILE=${OUTPUT_DIR}/cluster.yaml
4949
# TODO: Change the machine template once nodes are implemented
50-
MACHINES_TEMPLATE_FILE=${DIR}/machines_no_node.yaml.template
50+
MACHINES_TEMPLATE_FILE=${DIR}/machines.yaml.template
5151
MACHINES_GENERATED_FILE=${OUTPUT_DIR}/machines.yaml
5252
MANAGER_PATCH_TEMPLATE_FILE=${DIR}/azure_manager_image_patch.yaml.template
5353
MANAGER_PATCH_GENERATED_FILE=${OUTPUT_DIR}/azure_manager_image_patch.yaml

cmd/clusterctl/examples/azure/machines.yaml.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ items:
4242
spec:
4343
versions:
4444
kubelet: 1.13.4
45-
controlPlane: 1.13.4
4645
providerSpec:
4746
value:
4847
apiVersion: azureprovider/v1alpha1

docs/getting-started.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,16 @@ Here's an example of how to build controller images, if you're interested in tes
9898

9999
```bash
100100
# Build the image.
101-
PREFIX=quay.io/k8s \
102-
NAME=cluster-api-azure-controller \
103-
TAG=0.1.0-alpha.3 \
104-
make docker-build
101+
STABLE_DOCKER_REPO=quay.io/<name here> make docker-build
105102

106103
# Push the image.
107-
PREFIX=quay.io/k8s \
108-
NAME=cluster-api-azure-controller \
109-
TAG=0.1.0-alpha.3 \
110-
make docker-push
104+
STABLE_DOCKER_REPO=quay.io/<name here> make docker-push
111105
```
112106

113107
**NOTE:** In order for the created images to be used for testing, you must push them to a public container registry.
114108

109+
MANAGER_IMAGE must point to right repo, to make sure the image is picked up by bootstrap and target cluster
110+
115111
### Submitting PRs and testing
116112

117113
Pull requests and issues are highly encouraged!

pkg/apis/azureprovider/v1alpha1/azureclusterproviderconfig_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ type AzureClusterProviderSpec struct {
4848
// SAKeyPair is the service account key pair.
4949
SAKeyPair KeyPair `json:"saKeyPair,omitempty"`
5050

51+
// AdminKubeconfig generated using the certificates part of the spec
52+
// do not move to status, since it uses on disk ca certs, which causes issues during regeneration
53+
AdminKubeconfig string `json:"adminKubeconfig,omitempty"`
54+
55+
// DiscoveryHashes generated using the certificates part of the spec, used by master and nodes bootstrapping
56+
// this never changes until ca is rotated
57+
// do not move to status, since it uses on disk ca certs, which causes issues during regeneration
58+
DiscoveryHashes []string `json:"discoveryHashes,omitempty"`
59+
5160
// ClusterConfiguration holds the cluster-wide information used during a
5261
// kubeadm init call.
5362
ClusterConfiguration kubeadmv1beta1.ClusterConfiguration `json:"clusterConfiguration,omitempty"`

pkg/apis/azureprovider/v1alpha1/azureclusterproviderstatus_types.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ type AzureClusterProviderStatus struct {
3030
metav1.TypeMeta `json:",inline"`
3131
metav1.ObjectMeta `json:"metadata,omitempty"`
3232

33-
CertificateStatus CertificateStatus `json:"certificateStatus,omitempty"`
34-
Network Network `json:"network,omitempty"`
35-
Bastion VM `json:"bastion,omitempty"`
33+
Network Network `json:"network,omitempty"`
34+
Bastion VM `json:"bastion,omitempty"`
3635
}
3736

3837
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

pkg/apis/azureprovider/v1alpha1/types.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ type Network struct {
8585
APIServerIP PublicIP `json:"apiServerIp,omitempty"`
8686
}
8787

88-
//CertificateStatus contains fields generated along with certificate generation
89-
type CertificateStatus struct {
90-
// AdminKubeconfig generated using the certificates part of the spec
91-
AdminKubeconfig string `json:"adminKubeconfig,omitempty"`
92-
93-
// DiscoveryHashes generated using the certificates part of the spec, used by master and nodes bootstrapping
94-
// this never changes until ca is rotated
95-
DiscoveryHashes []string `json:"discoveryHashes,omitempty"`
96-
}
97-
9888
// TODO: Implement tagging
9989
/*
10090
// Tags defines resource tags.

pkg/apis/azureprovider/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cloud/azure/BUILD.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_library")
2+
3+
go_library(
4+
name = "go_default_library",
5+
srcs = [
6+
"defaults.go",
7+
"errors.go",
8+
"fake_interfaces.go",
9+
"interfaces.go",
10+
],
11+
importpath = "sigs.k8s.io/cluster-api-provider-azure/pkg/cloud/azure",
12+
visibility = ["//visibility:public"],
13+
deps = ["//vendor/github.com/Azure/go-autorest/autorest:go_default_library"],
14+
)

0 commit comments

Comments
 (0)