Skip to content

Commit

Permalink
[artemiscloud#676] modified manifests file and installed olm
Browse files Browse the repository at this point in the history
  • Loading branch information
Msarawan committed Sep 20, 2023
1 parent c5ce729 commit 209a961
Show file tree
Hide file tree
Showing 10 changed files with 1,670 additions and 115 deletions.
383 changes: 295 additions & 88 deletions api/v1alpha1/activemqartemissecurity_types.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/v1beta1/activemqartemisscaledown_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type ActiveMQArtemisScaledownSpec struct {
// Important: Run "make" to regenerate code after modifying this file

// Triggered by main ActiveMQArtemis CRD messageMigration entry
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Temporary",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Local Only",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
LocalOnly bool `json:"localOnly"`
// Specifies the minimum/maximum amount of compute resources required/allowed
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
Expand Down
4 changes: 3 additions & 1 deletion api/v1beta1/activemqartemissecurity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ type ActiveMQArtemisSecurity struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ActiveMQArtemisSecuritySpec `json:"spec,omitempty"`
Spec ActiveMQArtemisSecuritySpec `json:"spec,omitempty"`
// Specifies the security status modules
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="ActiveMQ Artemis Security Status"
Status ActiveMQArtemisSecurityStatus `json:"status,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions api/v2alpha1/activemqartemisscaledown_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type ActiveMQArtemisScaledownSpec struct {
// Important: Run "make" to regenerate code after modifying this file

// Triggered by main ActiveMQArtemis CRD messageMigration entry
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Local Only",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
LocalOnly bool `json:"localOnly"`
}

Expand Down
526 changes: 522 additions & 4 deletions bundle/manifests/activemq-artemis-operator.clusterserviceversion.yaml

Large diffs are not rendered by default.

141 changes: 133 additions & 8 deletions bundle/manifests/broker.amq.io_activemqartemissecurities.yaml

Large diffs are not rendered by default.

141 changes: 133 additions & 8 deletions config/crd/bases/broker.amq.io_activemqartemissecurities.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/artemiscloud/activemq-artemis-operator
newTag: 1.0.15
newName: quay.io/msarawan/operator
newTag: 1.0.14

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash


# This script is for installing OLM from a GitHub release

set -e

default_base_url=https://github.com/operator-framework/operator-lifecycle-manager/releases/download

if [[ ${#@} -lt 1 || ${#@} -gt 2 ]]; then
echo "Usage: $0 version [base_url]"
echo "* version: the github release version"
echo "* base_url: the github base URL (Default: $default_base_url)"
exit 1
fi

if kubectl get deployment olm-operator -n openshift-operator-lifecycle-manager > /dev/null 2>&1; then
echo "OLM is already installed in a different configuration. This is common if you are not running a vanilla Kubernetes cluster. Exiting..."
exit 1
fi

release="$1"
base_url="${2:-${default_base_url}}"
url="${base_url}/${release}"
namespace=olm

if kubectl get deployment olm-operator -n ${namespace} > /dev/null 2>&1; then
echo "OLM is already installed in ${namespace} namespace. Exiting..."
exit 1
fi

kubectl create -f "${url}/crds.yaml"
kubectl wait --for=condition=Established -f "${url}/crds.yaml"
kubectl create -f "${url}/olm.yaml"

# wait for deployments to be ready
kubectl rollout status -w deployment/olm-operator --namespace="${namespace}"
kubectl rollout status -w deployment/catalog-operator --namespace="${namespace}"

retries=30
until [[ $retries == 0 ]]; do
new_csv_phase=$(kubectl get csv -n "${namespace}" packageserver -o jsonpath='{.status.phase}' 2>/dev/null || echo "Waiting for CSV to appear")
if [[ $new_csv_phase != "$csv_phase" ]]; then
csv_phase=$new_csv_phase
echo "Package server phase: $csv_phase"
fi
if [[ "$new_csv_phase" == "Succeeded" ]]; then
break
fi
sleep 10
retries=$((retries - 1))
done

if [ $retries == 0 ]; then
echo "CSV \"packageserver\" failed to reach phase succeeded"
exit 1
fi

kubectl rollout status -w deployment/packageserver --namespace="${namespace}"

0 comments on commit 209a961

Please sign in to comment.