Skip to content

Commit

Permalink
feat(apis): adding logs apis
Browse files Browse the repository at this point in the history
  • Loading branch information
smileisak committed Jan 3, 2024
1 parent 71a3fde commit 314022b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis/zz_register.go

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

3 changes: 3 additions & 0 deletions config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ var ExternalNameConfigs = map[string]config.ExternalName{
"ovh_iploadbalancing_tcp_route": config.NameAsIdentifier,
"ovh_iploadbalancing_tcp_route_rule": config.NameAsIdentifier,
"ovh_iploadbalancing_vrack_network": config.NameAsIdentifier,
"ovh_dbaas_logs_cluster": config.NameAsIdentifier,
"ovh_dbaas_logs_graylog_output_stream": config.NameAsIdentifier,
"ovh_dbaas_logs_input": config.NameAsIdentifier,
}

// ExternalNameConfigurations applies all external name configs listed in the
Expand Down
20 changes: 20 additions & 0 deletions config/logs/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package logs

import "github.com/crossplane/upjet/pkg/config"

const (
shortGroup = "logs"
)

// Configure configures individual resources by adding custom ResourceConfigurators.
func Configure(p *config.Provider) {
p.AddResourceConfigurator("ovh_dbaas_logs_cluster", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
p.AddResourceConfigurator("ovh_dbaas_logs_graylog_output_stream", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
p.AddResourceConfigurator("ovh_dbaas_logs_input", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
}
3 changes: 3 additions & 0 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"

"github.com/edixos/provider-ovh/config/logs"

"github.com/edixos/provider-ovh/config/lb"

"github.com/edixos/provider-ovh/config/dns"
Expand Down Expand Up @@ -56,6 +58,7 @@ func GetProvider() *ujconfig.Provider {
dedicated_server.Configure,
dns.Configure,
lb.Configure,
logs.Configure,
} {
configure(pc)
}
Expand Down
4 changes: 4 additions & 0 deletions internal/controller/zz_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import (
tcproute "github.com/edixos/provider-ovh/internal/controller/lb/tcproute"
tcprouterule "github.com/edixos/provider-ovh/internal/controller/lb/tcprouterule"
vracknetwork "github.com/edixos/provider-ovh/internal/controller/lb/vracknetwork"
logscluster "github.com/edixos/provider-ovh/internal/controller/logs/logscluster"
logsinput "github.com/edixos/provider-ovh/internal/controller/logs/logsinput"
providerconfig "github.com/edixos/provider-ovh/internal/controller/providerconfig"
projectnetworkprivate "github.com/edixos/provider-ovh/internal/controller/publiccloudnetwork/projectnetworkprivate"
projectnetworkprivatesubnet "github.com/edixos/provider-ovh/internal/controller/publiccloudnetwork/projectnetworkprivatesubnet"
Expand Down Expand Up @@ -93,6 +95,8 @@ func Setup(mgr ctrl.Manager, o controller.Options) error {
tcproute.Setup,
tcprouterule.Setup,
vracknetwork.Setup,
logscluster.Setup,
logsinput.Setup,
providerconfig.Setup,
projectnetworkprivate.Setup,
projectnetworkprivatesubnet.Setup,
Expand Down

0 comments on commit 314022b

Please sign in to comment.