Skip to content

Commit

Permalink
Generate 2 release manifests; one for without certmanager
Browse files Browse the repository at this point in the history
one for with certmanager
  • Loading branch information
ChunyiLyu committed Mar 23, 2021
1 parent a11a217 commit 2c69f8f
Show file tree
Hide file tree
Showing 8 changed files with 361 additions and 37 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ cluster-operator:
## used in CI pipeline to create release artifact
generate-manifests:
mkdir -p releases
kustomize build config/installation/ > releases/messaging-topology-operator.yaml
kustomize build config/installation/ > releases/messaging-topology-operator.bak
sed '/CERTIFICATE_NAMESPACE.*CERTIFICATE_NAME/d' releases/messaging-topology-operator.bak > releases/messaging-topology-operator.yaml
kustomize build config/installation/cert-manager/ > releases/messaging-topology-operator-with-certmanager.yaml

CERT_MANAGER_VERSION ?=v1.2.0
cert-manager:
Expand Down
29 changes: 0 additions & 29 deletions config/default/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,11 @@ resources:
- ../../crd
- ../../manager
- ../../webhook
- ../../certmanager

patches:
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml

vars:
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service

images:
- name: controller
newName: rabbitmqoperator/messaging-topology-operator-dev
Expand Down
40 changes: 40 additions & 0 deletions config/default/overlays/cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# RabbitMQ Messaging Topology Kubernetes Operator

# Copyright 2021 VMware, Inc.
#
# This product is licensed to you under the Mozilla Public license, Version 2.0 (the "License"). You may not use this product except in compliance with the Mozilla Public License.
#
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
namespace: rabbitmq-system

resources:
- ../../base
- ../../../certmanager

vars:
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1
name: serving-cert # this name should match the one in certificate.yaml
2 changes: 1 addition & 1 deletion config/default/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace: rabbitmq-system

resources:
- ../../base
- ../cert-manager

patches:
- manager_image_patch.yaml
2 changes: 1 addition & 1 deletion config/default/overlays/kind/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace: rabbitmq-system

resources:
- ../../base
- ../cert-manager

patches:
- manager_image_patch.yaml
18 changes: 18 additions & 0 deletions config/installation/cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# RabbitMQ Messaging Topology Kubernetes Operator

# Copyright 2021 VMware, Inc.
#
# This product is licensed to you under the Mozilla Public license, Version 2.0 (the "License"). You may not use this product except in compliance with the Mozilla Public License.
#
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: rabbitmq-system
images:
- name: rabbitmqoperator/messaging-topology-operator-dev
newName: rabbitmqoperator/messaging-topology-operator
newTag: latest

resources:
- ../../default/overlays/cert-manager
6 changes: 1 addition & 5 deletions config/installation/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: rabbitmq-system
images:

- name: rabbitmqoperator/messaging-topology-operator-dev
newName: rabbitmqoperator/messaging-topology-operator
newTag: latest

resources:
- ../namespace/
- ../crd/
- ../rbac/
- ../manager/
- ../default/base
297 changes: 297 additions & 0 deletions go.sum

Large diffs are not rendered by default.

0 comments on commit 2c69f8f

Please sign in to comment.