Skip to content

Commit

Permalink
Skip Linux profile
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jul 5, 2023
1 parent 9f211f0 commit 5bb8f16
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,13 @@ else
endif

# Define Docker related variables. Releases should modify and double check these vars.
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
STAGING_REGISTRY := gcr.io/k8s-staging-cluster-api-azure
PROD_REGISTRY := registry.k8s.io/cluster-api-azure
PROJECT ?= pluralsh
REGISTRY ?= ghcr.io/$(PROJECT)
STAGING_REGISTRY := $(REGISTRY)
PROD_REGISTRY := $(REGISTRY)
IMAGE_NAME ?= cluster-api-azure-controller
CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME)
TAG ?= dev
TAG ?= v1.9.11
ARCH ?= $(GOARCH)
ALL_ARCH = amd64 arm arm64 ppc64le s390x

Expand Down
1 change: 1 addition & 0 deletions api/v1beta1/azuremanagedcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ type AzureManagedControlPlaneSpec struct {

// SSHPublicKey is a string literal containing an ssh public key base64 encoded.
// Immutable.
// +optional
SSHPublicKey string `json:"sshPublicKey"`

// DNSServiceIP is an IP address assigned to the Kubernetes DNS service.
Expand Down
15 changes: 0 additions & 15 deletions azure/services/managedclusters/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package managedclusters

import (
"context"
"encoding/base64"
"fmt"
"net"
"time"
Expand Down Expand Up @@ -270,10 +269,6 @@ func (s *ManagedClusterSpec) Parameters(ctx context.Context, existing interface{
ctx, log, done := tele.StartSpanWithLogger(ctx, "managedclusters.Service.Parameters")
defer done()

decodedSSHPublicKey, err := base64.StdEncoding.DecodeString(s.SSHPublicKey)
if err != nil {
return nil, errors.Wrap(err, "failed to decode SSHPublicKey")
}
managedCluster := containerservice.ManagedCluster{
Identity: &containerservice.ManagedClusterIdentity{
Type: containerservice.ResourceIdentityTypeSystemAssigned,
Expand All @@ -291,16 +286,6 @@ func (s *ManagedClusterSpec) Parameters(ctx context.Context, existing interface{
EnableRBAC: pointer.Bool(true),
DNSPrefix: &s.Name,
KubernetesVersion: &s.Version,
LinuxProfile: &containerservice.LinuxProfile{
AdminUsername: pointer.String(azure.DefaultAKSUserName),
SSH: &containerservice.SSHConfiguration{
PublicKeys: &[]containerservice.SSHPublicKey{
{
KeyData: pointer.String(string(decodedSSHPublicKey)),
},
},
},
},
ServicePrincipalProfile: &containerservice.ManagedClusterServicePrincipalProfile{
ClientID: pointer.String("msi"),
},
Expand Down
2 changes: 1 addition & 1 deletion config/capz/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: gcr.io/k8s-staging-cluster-api-azure/cluster-api-azure-controller:latest
- image: ghcr.io/pluralsh/cluster-api-azure-controller:v1.9.11
name: manager
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ spec:
required:
- location
- resourceGroupName
- sshPublicKey
- version
type: object
status:
Expand Down

0 comments on commit 5bb8f16

Please sign in to comment.