Fix olm
This commit is contained in:
16
core/olm/index.rhai
Normal file
16
core/olm/index.rhai
Normal file
@@ -0,0 +1,16 @@
|
||||
const VERSION="0.27.0";
|
||||
const SRC=src;
|
||||
const DEST=dest;
|
||||
const DOIT=config.apply;
|
||||
const sourcesDir=`https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v${VERSION}`;
|
||||
const sources=[
|
||||
"olm.yaml"
|
||||
];
|
||||
fn pre_pack() {
|
||||
for file in global::sources {
|
||||
shell(`curl -sL ${global::sourcesDir}/${file} > ${global::SRC}/${file}`);
|
||||
}
|
||||
}
|
||||
fn post_pack() {
|
||||
shell(`rm -f "${global::DEST}/operators.coreos.com_v1_OperatorGroup_global-operators.yaml" "${global::DEST}"/apiextensions*.yaml "${global::DEST}"/v1_Namespace*.yaml "${global::DEST}"/batch_v1_*.yaml`);
|
||||
}
|
||||
@@ -45,6 +45,11 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
operators_namespace:
|
||||
default: vynil-operators
|
||||
examples:
|
||||
- vynil-operators
|
||||
type: string
|
||||
dependencies:
|
||||
- dist: null
|
||||
category: crd
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: operators.coreos.com/v1
|
||||
kind: OperatorGroup
|
||||
metadata:
|
||||
name: global-operators
|
||||
namespace: operators
|
||||
17
core/olm/operators.tf
Normal file
17
core/olm/operators.tf
Normal file
@@ -0,0 +1,17 @@
|
||||
resource "kubernetes_namespace_v1" "operator_ns" {
|
||||
metadata {
|
||||
labels = local.common-labels
|
||||
name = var.operators_namespace
|
||||
}
|
||||
}
|
||||
resource "kubectl_manifest" "operator_group" {
|
||||
depends_on = [kubernetes_namespace_v1.operator_ns]
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: operators.coreos.com/v1
|
||||
kind: OperatorGroup
|
||||
metadata:
|
||||
name: global-operators
|
||||
namespace: ${var.operators_namespace}
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
EOF
|
||||
}
|
||||
Reference in New Issue
Block a user