Skip to content

Commit

Permalink
Merge branch 'master' into wenh/deprecate-126
Browse files Browse the repository at this point in the history
  • Loading branch information
gaopenghigh authored Apr 11, 2024
2 parents 39a1687 + 448efdd commit 7339936
Show file tree
Hide file tree
Showing 53 changed files with 2,449 additions and 576 deletions.
4 changes: 2 additions & 2 deletions .pipelines/.vsts-vhd-builder-release-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ parameters:
- name: build23H2
displayName: Build 23H2
type: boolean
default: False
default: True
- name: build23H2gen2
displayName: Build 23H2 Gen 2
type: boolean
default: False
default: True
- name: dryrun
displayName: Dry run
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/.vsts-vhd-builder-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ parameters:

variables:
- name: CONTAINER_IMAGE
value: 'mcr.microsoft.com/oss/azcu/go-dev:v1.34.7'
value: 'mcr.microsoft.com/oss/azcu/go-dev:v1.38.1'

pool:
name: $(POOL_NAME)
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/.vsts-vhd-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pool:

variables:
- name: CONTAINER_IMAGE
value: 'mcr.microsoft.com/oss/azcu/go-dev:v1.34.7'
value: 'mcr.microsoft.com/oss/azcu/go-dev:v1.38.1'

stages:
- stage: build_vhd
Expand Down
17 changes: 0 additions & 17 deletions .pipelines/templates/.builder-release-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ steps:
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e POOL_NAME=$(POOL_NAME) \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e SUBSCRIPTION_ID="${SUBSCRIPTION_ID}" \
-e AZURE_VM_SIZE=$(AZURE_VM_SIZE) \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_RESOURCE_GROUP_NAME} \
Expand Down Expand Up @@ -117,9 +114,6 @@ steps:
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e SUBSCRIPTION_ID="${SUBSCRIPTION_ID}" \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_RESOURCE_GROUP_NAME} \
-e OS_DISK_URI=${OS_DISK_URI} \
Expand Down Expand Up @@ -160,7 +154,6 @@ steps:
- bash: |
echo MODE=$(MODE) && \
PKR_RG_NAME="$(cat packer-output | grep "ResourceGroupName" | cut -d "'" -f 2 | head -1)" && \
SA_NAME="$(cat packer-output | grep "storage name:" | cut -d " " -f 3)" && \
captured_sig_version="$(cat vhdbuilder/packer/settings.json | grep "captured_sig_version" | awk -F':' '{print $2}' | awk -F'"' '{print $2}')" && \
IMPORTED_IMAGE_NAME="$(cat vhdbuilder/packer/settings.json | grep "imported_image_name" | awk -F':' '{print $2}' | awk -F'"' '{print $2}')" && \
ARM64_OS_DISK_SNAPSHOT_NAME="$(cat vhdbuilder/packer/settings.json | grep "arm64_os_disk_snapshot_name" | awk -F':' '{print $2}' | awk -F'"' '{print $2}')" && \
Expand All @@ -171,16 +164,12 @@ steps:
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e SUBSCRIPTION_ID="${SUBSCRIPTION_ID}" \
-e PKR_RG_NAME=${PKR_RG_NAME} \
-e MODE=${MODE} \
-e DRY_RUN=${DRY_RUN} \
-e OS_TYPE="Linux" \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_RESOURCE_GROUP_NAME} \
-e SA_NAME=${SA_NAME} \
-e IMAGE_NAME=${IMAGE_NAME} \
-e CAPTURED_SIG_VERSION=${captured_sig_version} \
-e IMPORTED_IMAGE_NAME=${IMPORTED_IMAGE_NAME} \
Expand All @@ -203,9 +192,6 @@ steps:
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e SUBSCRIPTION_ID="${SUBSCRIPTION_ID}" \
-e RESOURCE_GROUP_NAME="${AZURE_RESOURCE_GROUP_NAME}" \
-e LOCATION="${AZURE_LOCATION}" \
Expand All @@ -231,9 +217,6 @@ steps:
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e CLIENT_ID=${CLIENT_ID} \
-e CLIENT_SECRET="$(CLIENT_SECRET)" \
-e TENANT_ID=${TENANT_ID} \
-e SUBSCRIPTION_ID="${SUBSCRIPTION_ID}" \
-e RESOURCE_GROUP_NAME="${AZURE_RESOURCE_GROUP_NAME}" \
-e SIG_IMAGE_NAME=${SIG_IMAGE_NAME} \
Expand Down
21 changes: 21 additions & 0 deletions pkg/agent/datamodel/sig_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ var AvailableUbuntu2204Distros = []Distro{
AKSUbuntuEdgeZoneContainerd2204Gen2,
AKSUbuntuMinimalContainerd2204,
AKSUbuntuMinimalContainerd2204Gen2,
AKSUbuntuFipsContainerd2204,
AKSUbuntuFipsContainerd2204Gen2,
}

//nolint:gochecknoglobals
Expand All @@ -120,6 +122,8 @@ var AvailableContainerdDistros = []Distro{
AKSUbuntuFipsContainerd1804Gen2,
AKSUbuntuFipsContainerd2004,
AKSUbuntuFipsContainerd2004Gen2,
AKSUbuntuFipsContainerd2204,
AKSUbuntuFipsContainerd2204Gen2,
AKSUbuntuEdgeZoneContainerd1804,
AKSUbuntuEdgeZoneContainerd1804Gen2,
AKSCBLMarinerV1,
Expand Down Expand Up @@ -165,6 +169,7 @@ var AvailableGen2Distros = []Distro{
AKSUbuntuGPUContainerd1804Gen2,
AKSUbuntuFipsContainerd1804Gen2,
AKSUbuntuFipsContainerd2004Gen2,
AKSUbuntuFipsContainerd2204Gen2,
AKSUbuntuEdgeZoneContainerd1804Gen2,
AKSUbuntuArm64Containerd2204Gen2,
AKSUbuntuContainerd2204Gen2,
Expand Down Expand Up @@ -477,6 +482,20 @@ var (
Version: LinuxSIGImageVersion,
}

SIGUbuntuFipsContainerd2204ImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSUbuntuResourceGroup,
Gallery: AKSUbuntuGalleryName,
Definition: "2204fipscontainerd",
Version: "202404.09.0", // TODO(artunduman): Update version when the image is ready
}

SIGUbuntuFipsContainerd2204Gen2ImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSUbuntuResourceGroup,
Gallery: AKSUbuntuGalleryName,
Definition: "2204gen2fipscontainerd",
Version: "202404.09.0", // TODO(artunduman): Update version when the image is ready
}

SIGUbuntuArm64Containerd2204Gen2ImageConfigTemplate = SigImageConfigTemplate{
ResourceGroup: AKSUbuntuResourceGroup,
Gallery: AKSUbuntuGalleryName,
Expand Down Expand Up @@ -703,6 +722,8 @@ func getSigUbuntuImageConfigMapWithOpts(opts ...SigImageConfigOpt) map[Distro]Si
AKSUbuntuFipsContainerd1804Gen2: SIGUbuntuFipsContainerd1804Gen2ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuFipsContainerd2004: SIGUbuntuFipsContainerd2004ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuFipsContainerd2004Gen2: SIGUbuntuFipsContainerd2004Gen2ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuFipsContainerd2204: SIGUbuntuFipsContainerd2204ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuFipsContainerd2204Gen2: SIGUbuntuFipsContainerd2204Gen2ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuContainerd2204: SIGUbuntuContainerd2204ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuContainerd2204Gen2: SIGUbuntuContainerd2204Gen2ImageConfigTemplate.WithOptions(opts...),
AKSUbuntuContainerd2004CVMGen2: SIGUbuntuContainerd2004CVMGen2ImageConfigTemplate.WithOptions(opts...),
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/datamodel/sig_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var _ = Describe("GetSIGAzureCloudSpecConfig", func() {
Expect(sigConfig.SigTenantID).To(Equal("sometenantid"))
Expect(sigConfig.SubscriptionID).To(Equal("somesubid"))

Expect(len(sigConfig.SigUbuntuImageConfig)).To(Equal(21))
Expect(len(sigConfig.SigUbuntuImageConfig)).To(Equal(23))

aksUbuntuGPU1804Gen2 := sigConfig.SigUbuntuImageConfig[AKSUbuntuGPU1804Gen2]
Expect(aksUbuntuGPU1804Gen2.ResourceGroup).To(Equal("resourcegroup"))
Expand Down
4 changes: 4 additions & 0 deletions pkg/agent/datamodel/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ const (
AKSUbuntuFipsContainerd1804Gen2 Distro = "aks-ubuntu-fips-containerd-18.04-gen2"
AKSUbuntuFipsContainerd2004 Distro = "aks-ubuntu-fips-containerd-20.04"
AKSUbuntuFipsContainerd2004Gen2 Distro = "aks-ubuntu-fips-containerd-20.04-gen2"
AKSUbuntuFipsContainerd2204 Distro = "aks-ubuntu-fips-containerd-22.04"
AKSUbuntuFipsContainerd2204Gen2 Distro = "aks-ubuntu-fips-containerd-22.04-gen2"
AKSUbuntuEdgeZoneContainerd1804 Distro = "aks-ubuntu-edgezone-containerd-18.04"
AKSUbuntuEdgeZoneContainerd1804Gen2 Distro = "aks-ubuntu-edgezone-containerd-18.04-gen2"
AKSUbuntuEdgeZoneContainerd2204 Distro = "aks-ubuntu-edgezone-containerd-22.04"
Expand Down Expand Up @@ -246,6 +248,8 @@ var AKSDistrosAvailableOnVHD = []Distro{
AKSUbuntuFipsContainerd1804Gen2,
AKSUbuntuFipsContainerd2004,
AKSUbuntuFipsContainerd2004Gen2,
AKSUbuntuFipsContainerd2204,
AKSUbuntuFipsContainerd2204Gen2,
AKSUbuntuEdgeZoneContainerd1804,
AKSUbuntuEdgeZoneContainerd1804Gen2,
AKSUbuntuEdgeZoneContainerd2204,
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func getBaseTemplate() *nbcontractv1.Configuration {
CustomKubeBinaryUrl: "https://acs-mirror.azureedge.net/kubernetes/v1.26.0/binaries/kubernetes-node-linux-amd64.tar.gz",
PrivateKubeBinaryUrl: "",
},
KubeproxyUrl: "",
KubeProxyUrl: "",
EnableSsh: true,
}
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/proto/nbcontract/v1/apiserverconfig.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions pkg/proto/nbcontract/v1/apiserverconfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ syntax = "proto3";
package nbcontract.v1;

message ApiServerConfig {
string api_server_public_key = 1;
string api_server_name = 2;
}
// The certificate public key of the API server.
string api_server_public_key = 1;

// The name or endpoint URI of the API server.
string api_server_name = 2;
}
21 changes: 14 additions & 7 deletions pkg/proto/nbcontract/v1/authconfig.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions pkg/proto/nbcontract/v1/authconfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,24 @@ package nbcontract.v1;

// Auth Config fields stored in azure.json used by cloud-provider-azure
message AuthConfig {
string target_cloud = 1; // set to cloud, default to AzurePublicCloud
// Target cloud. Set to cloud. Default to AzurePublicCloud
string target_cloud = 1;

// Tenant ID
string tenant_id = 2;

// Subscription ID
string subscription_id = 3;
string service_principal_id = 4; // set to aadClientId
string service_principal_secret = 5; // set to aadClientSecret
string assigned_identity_id = 6; //could be user or system assigned, depending on the type
bool use_managed_identity_extension = 7; // default to false

// Service Principal ID. set to aadClientId
string service_principal_id = 4;

// Service Principal Secret. set to aadClientSecret
string service_principal_secret = 5;

// Assigned identity id, could be user or system assigned, depending on the type.
string assigned_identity_id = 6;

// Specify if use managed identity extension, default to false
bool use_managed_identity_extension = 7;
}
Loading

0 comments on commit 7339936

Please sign in to comment.