provider-grafana
is a Crossplane provider that
is built using Upjet code
generation tools and exposes XRM-conformant managed resources for the
Grafana API.
Install the provider by using the following command after changing the image tag to the latest release:
up ctp provider install xpkg.upbound.io/grafana/provider-grafana:v0.5.1
Alternatively, you can use declarative installation:
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-grafana
spec:
package: xpkg.upbound.io/grafana/provider-grafana:v0.5.1
EOF
Notice that in this example Provider resource is referencing ControllerConfig with debug enabled.
You can see the API reference here.
make submodules
Run code-generation pipeline:
make generate
Run against a Kubernetes cluster:
make run
Build, push, and install:
make all
Build binary:
make build
-
Ensure Crossplane is installed on your local cluster (instructions here)
-
Run the following:
kubectl config use-context <name-of-your-local-k8s-context> kubectl apply -f ./package/crossplane.yaml kubectl apply -f ./package/crds
Below are some issues that have been encountered and may be helpful in the future to others.
❯ make generate
14:35:30 [ .. ] generating provider schema for grafana/grafana 2.19.1
make[1]: *** [config/schema.json] Error 1
make: *** [generate] Error 2
Solution: ensure that you do not have a .terraformrc
defined somewhere. For example
~/.terraformrc
:
❯ cat ~/.terraformrc
provider_installation {
dev_overrides {
"grafana/grafana" = "/Users/joeyorlando/coding/grafana/terraform-provider-grafana"
}
}
Additionally, you can check the terraform
logs via:
❯ cat ./.work/terraform/terraform-logs.txt
...
Lastly, make sure that you have the following defined in your .bashrc
(or .zshrc
):
export PATH="$PATH:$HOME/go/bin"
For filing bugs, suggesting improvements, or requesting new features, please open an issue.