Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OLM deployment #1

Merged
merged 9 commits into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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.

FROM alpine:3.11 as chart-get

RUN apk add wget tar
RUN wget https://charts.jetstack.io/charts/cert-manager-v0.15.0-alpha.0.tgz
# TODO: add some kind of verification
RUN tar xzf cert-manager-v0.15.0-alpha.0.tgz

FROM quay.io/operator-framework/helm-operator:v0.15.1

### Required OpenShift Labels
LABEL name="cert-manager Operator" \
vendor="Jetstack" \
version="v0.15.0-alpha.0" \
release="1" \
summary="This is the cert-manager operator." \
description="This operator will deploy cert-manager to the cluster."

# Required Licenses
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSE /licenses/LICENSE
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSES /licenses/LICENSES

COPY --from=chart-get /cert-manager/ ${HOME}/helm-charts/cert-manager
COPY watches.yaml ${HOME}/watches.yaml
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# cert-manager-olm
# cert-manager operator deployment
Definitions for the cert-manager operator published via Red Hat's Operator Lifecycle Manager (OLM)

This repository contains all files that are used to build the [operator](https://operatorhub.io/what-is-an-operator) to deploy cert-manager.
This is to allow users of OpenShift and OperatorHub to easily install cert-manager into their clusters. It is currently an experimental deployment method.
This includes the operator itself, based on the Helm operator as well as Dockerfiles to build [UBI](https://connect.redhat.com/about/faq/what-red-hat-universal-base-image-ubi-0) based images.

This repository contains all files that are used by the RedHat image builder to release the operator.

For more info on cert-manager, please see [the cert-manager repository](https://github.com/jetstack/cert-manager) or [cert-manager.io](https://cert-manager.io)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: certmanagers.operator.cert-manager.io
spec:
group: operator.cert-manager.io
names:
kind: CertManager
listKind: CertManagerList
plural: certmanagers
singular: certmanager
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packageName: cert-manager-operator
channels:
- name: alpha
currentCSV: cert-manager-operator.v0.15.0-alpha.0
defaultChannel: alpha
31 changes: 31 additions & 0 deletions ubi-images/Dockerfile.acmesolver
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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.

FROM quay.io/jetstack/cert-manager-acmesolver:v0.15.0-alpha.0 as source
FROM registry.access.redhat.com/ubi8/ubi-minimal

COPY --from=source /app /app
# Required Licenses
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSE /licenses/LICENSE
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSES /licenses/LICENSES

### Required OpenShift Labels
LABEL name="cert-manager acmesolver" \
vendor="Jetstack" \
version="v0.15.0-alpha.1" \
release="1" \
summary="This is the cert-manager ACME HTTP01 solver image." \
description="This image contains the resolve for ACME HTTP01 challenges."

CMD "/app/cmd/acmesolver/acmesolver"
32 changes: 32 additions & 0 deletions ubi-images/Dockerfile.cainjector
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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.

FROM quay.io/jetstack/cert-manager-cainjector:v0.15.0-alpha.0 as source
FROM registry.access.redhat.com/ubi8/ubi-minimal

COPY --from=source /app /app
# Required Licenses
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSE /licenses/LICENSE
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSES /licenses/LICENSES

### Required OpenShift Labels
LABEL name="cert-manager cainjector" \
vendor="Jetstack" \
version="v0.15.0-alpha.0" \
release="1" \
summary="This is the cert-manager cainjector." \
description="This image contains the cert-manager cainjector."


CMD "/app/cmd/cainjector/cainjector"
31 changes: 31 additions & 0 deletions ubi-images/Dockerfile.controller
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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.

FROM quay.io/jetstack/cert-manager-controller:v0.15.0-alpha.0 as source
FROM registry.access.redhat.com/ubi8/ubi-minimal

COPY --from=source /app /app
# Required Licenses
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSE /licenses/LICENSE
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSES /licenses/LICENSES

### Required OpenShift Labels
LABEL name="cert-manager controller" \
vendor="Jetstack" \
version="v0.15.0-alpha.0" \
release="1" \
summary="This is the cert-manager controller image." \
description="This image contains the main cert-manager controller."

CMD "/app/cmd/controller/controller"
31 changes: 31 additions & 0 deletions ubi-images/Dockerfile.webhook
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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.

FROM quay.io/jetstack/cert-manager-webhook:v0.15.0-alpha.0 as source
FROM registry.access.redhat.com/ubi8/ubi-minimal

COPY --from=source /app /app
# Required Licenses
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSE /licenses/LICENSE
ADD https://raw.githubusercontent.com/jetstack/cert-manager/v0.15.0-alpha.0/LICENSES /licenses/LICENSES

### Required OpenShift Labels
LABEL name="cert-manager webhook" \
vendor="Jetstack" \
version="v0.15.0-alpha.0" \
release="1" \
summary="This is the cert-manager webhook image." \
description="This image contains the webhook server for cert-manager."

CMD "/app/cmd/webhook/webhook"
14 changes: 14 additions & 0 deletions watches.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- version: v1alpha1
group: operator.cert-manager.io
kind: CertManager
chart: helm-charts/cert-manager
overrideValues:
image.repository: registry.connect.redhat.com/jetstack/cert-manager-controller
image.tag: v0.15.0-alpha.0-ubi
webhook.image.repository: registry.connect.redhat.com/jetstack/cert-manager-webhook
webhook.image.tag: v0.15.0-alpha.0-ubi
cainjector.image.repository: registry.connect.redhat.com/jetstack/cert-manager-cainjector
cainjector.image.tag: v0.15.0-alpha.0-ubi
installCRDs: true
extraArgs[0]: --acme-http01-solver-image=registry.connect.redhat.com/jetstack/cert-manager-acmesolver:v0.15.0-alpha.0-ubi