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

PLT-1346: Introduce Basic OCI #500

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

PLT-1346: Introduce Basic OCI #500

wants to merge 6 commits into from

Conversation

wcrum
Copy link
Member

@wcrum wcrum commented Aug 15, 2024

Current behavior is below, where func() resourceRegistryOciEcr schema handles both ECR and Basic repositories, if needed I can have separation between basic and ecr, but this would require changes to the base resource spectrocloud_registry_oci.

resource "spectrocloud_registry_oci" "r1" {
  name       = "test-nik4"
  type       = "basic" # basic
  endpoint   = "harbor.registry"
  provider_type = "helm"
  credentials {
    credential_type = "basic"
    username = "username"
    password = "password"
  }
}

Additionally, given that OCI registries exist at a tenant level, would need provider.go to support tenant level actions, like the commented client.WithScopeTenant()(c)

//else {
// client.WithScopeTenant()(c)
//}

@SivaanandM
Copy link
Contributor

Current behavior is below, where func() resourceRegistryOciEcr schema handles both ECR and Basic repositories, if needed I can have separation between basic and ecr, but this would require changes to the base resource spectrocloud_registry_oci.

resource "spectrocloud_registry_oci" "r1" {
  name       = "test-nik4"
  type       = "basic" # basic
  endpoint   = "harbor.registry"
  provider_type = "helm"
  credentials {
    credential_type = "basic"
    username = "username"
    password = "password"
  }
}

Additionally, given that OCI registries exist at a tenant level, would need provider.go to support tenant level actions, like the commented client.WithScopeTenant()(c)

//else {
// client.WithScopeTenant()(c)
//}

So basically registries can be created only and tenant level. and used across the projects. this is handled in resource level itself. not required to update provider.go

@SivaanandM
Copy link
Contributor

Kindly address the review comments. We will prioritize the changes for testing and include them in the corresponding release.

wcrum and others added 3 commits August 23, 2024 07:59
For provider_type we can t have required and default. it mutually exclusive. so made it as optional but it will default to 'helm'
@SivaanandM SivaanandM changed the base branch from main to release-4.4.c August 28, 2024 04:55
Base automatically changed from release-4.4.c to main September 3, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants