From 2593f6d91b7cbab9aaea2a5333e27185f81549a9 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Sat, 2 Oct 2021 09:50:09 +0200 Subject: [PATCH] Add: Civo provider Signed-off-by: Nicolas Lamirault --- krm/civo/config.yaml | 27 +++++++++++++++++++++++++++ krm/civo/controller-config.yaml | 26 ++++++++++++++++++++++++++ krm/civo/kustomization.yaml | 30 ++++++++++++++++++++++++++++++ krm/civo/labels.yaml | 32 ++++++++++++++++++++++++++++++++ krm/civo/provider.yaml | 23 +++++++++++++++++++++++ 5 files changed, 138 insertions(+) create mode 100644 krm/civo/config.yaml create mode 100644 krm/civo/controller-config.yaml create mode 100644 krm/civo/kustomization.yaml create mode 100644 krm/civo/labels.yaml create mode 100644 krm/civo/provider.yaml diff --git a/krm/civo/config.yaml b/krm/civo/config.yaml new file mode 100644 index 0000000..3f04cab --- /dev/null +++ b/krm/civo/config.yaml @@ -0,0 +1,27 @@ +# Copyright (C) 2021 Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +apiVersion: civo.crossplane.io/v1alpha1 +kind: ProviderConfig +metadata: + name: crossplane-civo +spec: + region: lon1 + credentials: + source: Secret + secretRef: + namespace: crossplane-system + name: crossplane-civo-credentials + key: credentials \ No newline at end of file diff --git a/krm/civo/controller-config.yaml b/krm/civo/controller-config.yaml new file mode 100644 index 0000000..752bb6f --- /dev/null +++ b/krm/civo/controller-config.yaml @@ -0,0 +1,26 @@ +# Copyright (C) 2021 Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +apiVersion: pkg.crossplane.io/v1alpha1 +kind: ControllerConfig +metadata: + name: crossplane-civo +spec: + podSecurityContext: + fsGroup: 2000 + # https://github.com/crossplane/crossplane/blob/master/docs/reference/troubleshoot.md + args: + - --debug + # replicas: 0 diff --git a/krm/civo/kustomization.yaml b/krm/civo/kustomization.yaml new file mode 100644 index 0000000..1eca79c --- /dev/null +++ b/krm/civo/kustomization.yaml @@ -0,0 +1,30 @@ +# Copyright (C) 2021 Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./network.yaml +- ./subnetwork.yaml +- ./firewall.yaml +- ./iam.yaml +- ./bucket.yaml +- ./memorystore.yaml +- ./cloudsql.yaml +- ./pubsub.yaml +- ./gke.yaml + +transformers: +- labels.yaml diff --git a/krm/civo/labels.yaml b/krm/civo/labels.yaml new file mode 100644 index 0000000..276c0ce --- /dev/null +++ b/krm/civo/labels.yaml @@ -0,0 +1,32 @@ +# Copyright (C) 2021 Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +apiVersion: builtin +kind: LabelTransformer +metadata: + name: labels +labels: + app.kubernetes.io/name: portefaix-krm-civo + app.kubernetes.io/instance: portefaix-krm-civo-app + app.kubernetes.io/component: krm-crossplane + app.kubernetes.io/version: v0.1.0 + app.kubernetes.io/part-of: portefaix-krm-civo + app.kubernetes.io/managed-by: kustomize + portefaix.xyz/version: v0.19.0 + crossplane.io/version: v0.14.0 + crossplane.io/provider: civo-v0.0.0 +fieldSpecs: +- path: metadata/labels + create: true diff --git a/krm/civo/provider.yaml b/krm/civo/provider.yaml new file mode 100644 index 0000000..9260629 --- /dev/null +++ b/krm/civo/provider.yaml @@ -0,0 +1,23 @@ +# Copyright (C) 2021 Nicolas Lamirault +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +apiVersion: pkg.crossplane.io/v1 +kind: Provider +metadata: + name: crossplane-civo +spec: + package: crossplane/provider-civo:master + controllerConfigRef: + name: crossplane-civo