Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPC Support in AKO #1416

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

abhishekbsingh
Copy link
Contributor

@abhishekbsingh abhishekbsingh commented Apr 29, 2024

Overview of behaviour changes and how they are implemented - https://confluence.eng.vmware.com/display/NSBU/AKO+Changes+to+support+NSX+VPCs

@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

1 similar comment
@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

1 similar comment
@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from 1ddc34e to df8276b Compare May 8, 2024 16:27
@Dhivyaaj
Copy link

Dhivyaaj commented May 8, 2024

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

skip jira-id-check

@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from df8276b to 1b1e1d7 Compare May 8, 2024 16:52
@Dhivyaaj
Copy link

Dhivyaaj commented May 8, 2024

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from 1b1e1d7 to f7c5437 Compare May 8, 2024 17:05
@Dhivyaaj
Copy link

Dhivyaaj commented May 8, 2024

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from f7c5437 to 1f32ac6 Compare May 9, 2024 07:43
@Dhivyaaj
Copy link

Dhivyaaj commented May 9, 2024

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh
Copy link
Contributor Author

skip jira-id-check

@Dhivyaaj
Copy link

Dhivyaaj commented May 9, 2024

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from 1f32ac6 to d653c48 Compare May 10, 2024 11:40
@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

1 similar comment
@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from d653c48 to 38871c8 Compare May 20, 2024 06:16
@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

1 similar comment
@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from 38871c8 to b102030 Compare May 25, 2024 02:49
@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh abhishekbsingh force-pushed the topic/abishekb/nsx-vpcs-in-ako branch from b102030 to 341d5db Compare May 25, 2024 03:15
@Dhivyaaj
Copy link

No JIRA Ids found for the PR. Jira id is mandatory to update fix version in jira. Please update respective Jira id in PR title or commit message if the PR is intented for default branches of repo. For mandatory exemptions, comment trigger phrase 'skip jira-id-check' in PR. For manual trigger, comment trigger phrase 'run jira-id-check' in PR.

@abhishekbsingh
Copy link
Contributor Author

build ako

2 similar comments
@abhishekbsingh
Copy link
Contributor Author

build ako

@abhishekbsingh
Copy link
Contributor Author

build ako

@@ -359,6 +359,9 @@ func (l *leader) ValidateAviInfraSetting(key string, infraSetting *akov1beta1.Av
if infraSetting.Spec.SeGroup.Name != "" {
refData[infraSetting.Spec.SeGroup.Name] = "ServiceEngineGroup"
}
if infraSetting.Spec.Tenant.Name != nil && !utils.IsVCFCluster() {
refData[*infraSetting.Spec.Tenant.Name] = "Tenant"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think presense of tenant ref should be validated only in admin tenant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presently, every ref in CRs is validated in Admin tenant only. Will handle CRD validation in subsequent PRs

@abhishekbsingh
Copy link
Contributor Author

build ako

1 similar comment
@abhishekbsingh
Copy link
Contributor Author

build ako

akoControlConfig.SetAKOInstanceFlag(true)
lib.SetNamePrefix("")
lib.SetAKOUser(lib.AKOPrefix)
//utils.AviLog.SetLevel("INFO")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove commented code.

ctrlPropCache := utils.SharedCtrlProp()
ctrlPropCache.PopulateCtrlProp(ctrlProps)
if cfg.useEnvoy {
ctrlPropCache.PopulateCtrlAPIScheme("http")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be https for secure connection?

flag.StringVar(&password, "password", "", "NSX ALB Controller authentication password")
flag.StringVar(&albCtrlCert, "cacert", "", "NSX ALB Controller authentication certificate")
flag.StringVar(&clusterID, "cluster-id", "", "AKO cluster name")
flag.BoolVar(&useEnvoy, "use-envoy", false, "Use Envoy sidecar proxy in VCSA")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is use of envoy?


ctx, cancelFunc := context.WithTimeout(context.Background(), 120*time.Second)
defer cancelFunc()
err := cfg.Cleanup(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we deleting all avi resources? There is deleteConfig functionality present in AKO. Can we use that? It deletes all resources created by current AKO. Can we use that?


func getInfraSettingNameFromT1LR(lr string) string {
arr := strings.Split(lr, "/")
infraSettingName := arr[len(arr)-1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume lr has specific format and string split should result in non-zero len array. Else this line will cause index out of range error.

if len(infraSettingCRs) == 0 {
return nil
}
namespaces, err := utils.GetInformers().NSInformer.Lister().List(labels.Set(nil).AsSelector())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maintain map of aviinfrasetting to namespace during namespace event handler or other add event so that it will be faster to delete not required entries?

}
}

func (v *VPCHandler) SyncLSLRNetwork() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple SyncLSLRNetwork functions (one in VCF context and one in VPC context) to update cloud with tier1lr. Will it possible that it will create conflict?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, only one will be enabled due lib.IsVPCmode() check.

if err != nil {
utils.AviLog.Fatalf("Error building AKO CRD v1beta1 clientset: %s", err.Error())
}

utils.AviLog.Infof("Successfully created kube client for ako-infra")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this message before line number 77.

lib.AKOControlConfig().SetControllerVersion(currentControllerVersion)
ctrlVersion = currentControllerVersion
}
// set the tenant and controller version in avisession obj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should be modified as we are setting up controller version only.

err = c.AviCloudPropertiesPopulate(client[0], cloud)
if err != nil {
return vsCacheCopy, allVsKeys, err
}
}
if lib.GetDeleteConfigMap() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arihantg: We should test deletConfig functionality with tenancy into picture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants