Feature/filter alicloud resources by tags#9
Feature/filter alicloud resources by tags#9openshift-merge-robot merged 6 commits intoopenshift:mainfrom menglingwei:feature/filter-alicloud-resources-by-tags
Conversation
|
Hi @menglingwei. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: menglingwei The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| if machineProviderConfig.VpcID != "" { | ||
| request.VpcId = machineProviderConfig.VpcID | ||
| } | ||
| if machineProviderConfig.ResourceGroupID != "" { |
There was a problem hiding this comment.
When ResourceGroupID is specified I am unable to query for the correct security group. I would remove resource group id.
aliyun ecs DescribeSecurityGroups --RegionId us-east-1 \
--Tag.0.Key owned --Tag.0.Value "kubernetes.io/cluster/test-2mbh7" \
--Tag.1.Key Name --Tag.1.Value "test-2mbh7-sg-worker" \
--Tag.2.Key OCP --Tag.2.Value "ISV Integration"
{
"PageNumber": 1,
"PageSize": 10,
"RegionId": "us-east-1",
"RequestId": "BCD4DF49-FEED-57F6-A3AE-D670FB876026",
"SecurityGroups": {
"SecurityGroup": [
{
"CreationTime": "2021-11-01T17:11:52Z",
"Description": "Created By OpenShift Installer",
"ResourceGroupId": "",
"SecurityGroupId": "sg-0xi9838n99r7i86s6rri",
"SecurityGroupName": "test-2mbh7-sg-worker",
"SecurityGroupType": "normal",
"ServiceManaged": false,
"Tags": {
"Tag": [
{
"TagKey": "kubernetes.io/cluster/test-2mbh7",
"TagValue": "owned"
},
{
"TagKey": "Name",
"TagValue": "test-2mbh7-sg-worker"
},
{
"TagKey": "OCP",
"TagValue": "ISV Integration"
}
]
},
"VpcId": "vpc-0xiosfgntngzl5ali1wj5"
...
Notice the resourceGroupID is not set.
There was a problem hiding this comment.
I think if you don't assign an instance(ig. ECS Instance Or SecurityGroup ,etc) to a resource group. You don't need to set the resourceGroupID. If you set the resourceGroupID. The API simply returns the resources under a given resource group.
pkg/actuators/machine/instances.go
Outdated
There was a problem hiding this comment.
for idx, tag := range tags {
pkg/apis/alibabacloudprovider/v1beta1/alibabacloudmachineproviderconfig_types.go
Show resolved
Hide resolved
|
@menglingwei I have left some feedback. We would like meet and chat about the cluster-api-provider-alibaba and the future plans of the provider types as well as these changes. Please sync up with Brian. Thanks! |
|
@menglingwei Also running into issues when accepting nodes into the cluster. We have an machine-approver that runs which accepts the node's certificate signing request. This is failing due to providerID being in a different format in two different locations. We will need to solve this as well so that nodes will be auto-accepted into the cluster. |
|
@kwoodson In Machine-API, we set the ProviderID follow the format "alibabacloud:///RegionID/ZoneID/InstanceID". Do we need to keep the same ProviderID with CCM? |
|
@menglingwei I think we should match what is in the CCM. The code in the cluster-api-provider-alibaba that you referenced is here: cluster-api-provider-alibaba/pkg/actuators/machine/reconciler.go Lines 312 to 316 in 42ab2e5 The CCM expects the code to be in this format I think we should match the CCM's expectation with @menglingwei WDYT? |
It's ok.I'll do it. |
|
/ok-to-test |
filter alibabacloud resources (eg. SecurityGroupIDs ,VSwitchID) by tags