goharbor / terraform-provider-harbor

A Terraform provider for Harbor. To configure and manage all aspects of your Harbor Container Registry with Terraform Infrastructure as Code.
https://registry.terraform.io/providers/goharbor/harbor
MIT License
118 stars 90 forks source link

Add support for preheat APIs #445

Open kakkoyun opened 4 months ago

kakkoyun commented 4 months ago

Feature Request: Support for Harbor Preheat API Configuration

Is your feature request related to a problem? Please describe.

Currently, this provider does not support configuring the Harbor Preheat API. This feature would greatly enhance the ability to manage image preheating in Harbor projects, ensuring optimized performance and efficiency.

For more details, refer to the official Harbor documentation on preheating images: Harbor Preheat Images Documentation.

Describe the solution you'd like

I am keen to contribute by adding the necessary APIs for this feature. However, I would appreciate some guidance on how to move forward. Could you provide any pointers or resources to help me get started?

flbla commented 4 months ago

hi @kakkoyun, thank you for the feature request. we also need to manage preheat instances before we can create policies.

I started to implement the preheat instance

resource "harbor_preheat_instance" "example" {
  name       = "example-preheat-instance"
  vendor     = "dragonfly"
  endpoint   = "http://example.com"
  auth_mode  = "BASIC"
  username   = "example-user"
  password   = "example-password"
}

let me know if you want to implement preheat policy

kakkoyun commented 4 months ago

@flbla Thanks for the swift action! Awesome, I'll try this sometime this week and give you my feedback 🙏