terraform-provider-olm

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider OLM

Introduction

This is a Terraform provider for Operator Lifecycle Manager. It can be used to install OLM and manage operators through subscriptions.

Status

This provider is a proof of concept using mostly the installer module from operator-sdk and code derived from it. It is what I would call a spaghetti code held together by hope. Use in production at you own risk Currently supports only OLM v0. OLM v1 support is planned soon, but probably after this gets cleaned up a bit.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
  4. Or build the provider using the go build command
go install
  1. Or build the provider using the Go build command:
go build

## Adding Dependencies

This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency `github.com/author/dependency` to your Terraform provider:

```shell
go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Using the provider

You need a kubeconfig file to use this provider. It can come from anywhere, but must be set as raw in the provider configuration. It will use the current context from the kubeconfig file.

provider "olm" {
  kubeconfig = file("~/.kube/config")
}

You can also pass in the certificates directly, but do that if you know what you are doing. For more information on how to use the provider, see the examples directory.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory. Or run go build. This will build the provider and put the provider binary in the local directory.

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc. To run a lint, run make lint. (you need golangci-lint installed)

Note: Acceptance tests create real resources, and often cost money to run.

Contributing

Contributions are welcome!

License

Most of the actual provider code is licensed under Mozilla Public License 2.0.

The imporant part(everything under internal/olm) is licensed under the Apache 2.0 license. That is the code that was taken or derived from operator-sdk

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
bindata/olm
Code generated for package olm by go-bindata DO NOT EDIT.
Code generated for package olm by go-bindata DO NOT EDIT.
olm/client
Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation.
Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation.
olm/installer
Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation.
Package olm provides an API to install, uninstall, and check the status of an Operator Lifecycle Manager installation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL