Skip to content

Commit

Permalink
modify setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiying-lin committed Nov 21, 2024
1 parent f89a3ef commit 37a1e18
Show file tree
Hide file tree
Showing 16 changed files with 1,453 additions and 70 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/trafficmanagerbackend_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
// +kubebuilder:resource:scope=Namespaced,categories={fleet-networking},shortName=tmb
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:JSONPath=`.spec.profile.name`,name="Profile",type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.endpointRef.name`,name="Backend",type=string
// +kubebuilder:printcolumn:JSONPath=`.spec.backend.name`,name="Backend",type=string
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=='Accepted')].status`,name="Is-Accepted",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

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

8 changes: 8 additions & 0 deletions azure_config-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
azureCloudConfig:
cloud: "AzurePublicCloud"
subscriptionId: "c4528d9e-c99a-48bb-b12d-fde2176a43b8"
useManagedIdentityExtension: true
userAssignedIdentityID: "7099e851-09b2-4214-ba5f-d4d7de33b8a3"
resourceGroup: "zhiyinglin-fleet-networking-e2e-atm-1"
location: "westcentralus"
vnetName: "my-vnet"
9 changes: 9 additions & 0 deletions azure_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"cloud": "AzurePublicCloud",
"subscriptionId": "c4528d9e-c99a-48bb-b12d-fde2176a43b8",
"useManagedIdentityExtension": true,
"userAssignedIdentityID": "7099e851-09b2-4214-ba5f-d4d7de33b8a3",
"resourceGroup": "zhiyinglin-fleet-networking-e2e-atm-1",
"location": "westcentralus",
"vnetName": "my-vnet",
}
52 changes: 52 additions & 0 deletions charts/hub-net-controller-manager/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,58 @@ rules:
- get
- list
- watch
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerbackends
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerbackends/finalizers
verbs:
- update
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerbackends/status
verbs:
- get
- patch
- update
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerprofiles
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerprofiles/finalizers
verbs:
- update
- apiGroups:
- networking.fleet.azure.com
resources:
- trafficmanagerprofiles/status
verbs:
- get
- patch
- update
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
12 changes: 6 additions & 6 deletions cmd/hub-net-controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,6 @@ func main() {
exitWithErrorFunc()
}

klog.V(1).InfoS("Starting ServiceExportImport controller manager")
if err := mgr.Start(ctx); err != nil {
klog.ErrorS(err, "Problem running manager")
exitWithErrorFunc()
}

discoverClient := discovery.NewDiscoveryClientForConfigOrDie(hubConfig)
if *enableV1Beta1APIs {
gvk := clusterv1beta1.GroupVersion.WithKind(clusterv1beta1.MemberClusterKind)
Expand Down Expand Up @@ -234,6 +228,12 @@ func main() {
exitWithErrorFunc()
}
}

klog.V(1).InfoS("Starting ServiceExportImport controller manager")
if err := mgr.Start(ctx); err != nil {
klog.ErrorS(err, "Problem running manager")
exitWithErrorFunc()
}
}

// initAzureTrafficManagerClients initializes the Azure Traffic Manager profiles and endpoints clients.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
- jsonPath: .spec.profile.name
name: Profile
type: string
- jsonPath: .spec.endpointRef.name
- jsonPath: .spec.backend.name
name: Backend
type: string
- jsonPath: .status.conditions[?(@.type=='Accepted')].status
Expand Down
3 changes: 3 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ rules:
- multiclusterservices
- serviceexports
- serviceimports
- trafficmanagerbackends
- trafficmanagerprofiles
verbs:
- create
Expand All @@ -86,6 +87,7 @@ rules:
- multiclusterservices/status
- serviceexports/status
- serviceimports/status
- trafficmanagerbackends/status
- trafficmanagerprofiles/status
verbs:
- get
Expand All @@ -96,6 +98,7 @@ rules:
resources:
- multiclusterservices/finalizers
- serviceimports/finalizers
- trafficmanagerbackends/finalizers
- trafficmanagerprofiles/finalizers
verbs:
- get
Expand Down
8 changes: 8 additions & 0 deletions hub_azure_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
azureCloudConfig:
cloud: "AzurePublicCloud"
subscriptionId: "c4528d9e-c99a-48bb-b12d-fde2176a43b8"
useManagedIdentityExtension: true
userAssignedIdentityID: "aab3e00d-6427-48b0-af5d-ddffb2a284e0"
resourceGroup: "zhiyinglin-fleet-networking-e2e-atm-1"
location: "westcentralus"
vnetName: "my-vnet"
8 changes: 8 additions & 0 deletions member_1_azure_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
azureCloudConfig:
cloud: "AzurePublicCloud"
subscriptionId: "c4528d9e-c99a-48bb-b12d-fde2176a43b8"
useManagedIdentityExtension: true
userAssignedIdentityID: "f882963a-abce-416c-9e44-172f678475f9"
resourceGroup: "MC_zhiyinglin-fleet-networking-e2e-atm-1_member-1_westcentralus"
location: "westcentralus"
vnetName: "my-vnet"
8 changes: 8 additions & 0 deletions member_2_azure_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
azureCloudConfig:
cloud: "AzurePublicCloud"
subscriptionId: "c4528d9e-c99a-48bb-b12d-fde2176a43b8"
useManagedIdentityExtension: true
userAssignedIdentityID: "30d298c0-bf15-402a-b072-8fef4b3653ef"
resourceGroup: "MC_zhiyinglin-fleet-networking-e2e-atm-1_member-2_westcentralus"
location: "westcentralus"
vnetName: "my-vnet"
Loading

0 comments on commit 37a1e18

Please sign in to comment.