Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update CRD template
Signed-off-by: Daniel Fan <[email protected]>
  • Loading branch information
Daniel-Fan committed May 15, 2023
commit 4024ccbd888e784e5271cf50c3f2840490aba7b0
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ VERSION ?= $(shell git describe --exact-match 2> /dev/null || \
git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8)
RELEASE_VERSION ?= $(shell cat ./version/version.go | grep "Version =" | awk '{ print $$3}' | tr -d '"')
LATEST_VERSION ?= latest
OPERATOR_SDK_VERSION=v1.10.0
OPERATOR_SDK_VERSION=v1.24.0
YQ_VERSION=v4.3.1

LOCAL_OS := $(shell uname)
Expand Down Expand Up @@ -134,21 +134,21 @@ else
YQ=$(shell which yq)
endif

# operator-sdk:
# ifneq ($(shell operator-sdk version | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '"' | xargs | cut -d '.' -f1), v1)
# @{ \
# if [ "$(shell ./bin/operator-sdk version | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '"' | xargs)" != $(OPERATOR_SDK_VERSION) ]; then \
# set -e ; \
# mkdir -p bin ;\
# echo "Downloading operator-sdk..." ;\
# curl -sSLo ./bin/operator-sdk "https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(LOCAL_OS)_$(LOCAL_ARCH)" ;\
# chmod +x ./bin/operator-sdk ;\
# fi ;\
# }
# OPERATOR_SDK=$(realpath ./bin/operator-sdk)
# else
# OPERATOR_SDK=$(shell which operator-sdk)
# endif
operator-sdk:
ifneq ($(shell operator-sdk version | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '"' | xargs | cut -d '.' -f1), v1)
@{ \
if [ "$(shell ./bin/operator-sdk version | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '"' | xargs)" != $(OPERATOR_SDK_VERSION) ]; then \
set -e ; \
mkdir -p bin ;\
echo "Downloading operator-sdk..." ;\
curl -sSLo ./bin/operator-sdk "https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$(LOCAL_OS)_$(LOCAL_ARCH)" ;\
chmod +x ./bin/operator-sdk ;\
fi ;\
}
OPERATOR_SDK=$(realpath ./bin/operator-sdk)
else
OPERATOR_SDK=$(shell which operator-sdk)
endif

code-dev: ## Run the default dev commands which are the go tidy, fmt, vet then execute the $ make code-gen
@echo Running the common required commands for developments purposes
Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/operandrequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ type OperandStatus struct { //Top level CR status ie the CR created by ODLM
APIVersion string `json:"apiVersion,omitempty"`
Namespace string `json:"namespace,omitempty"`
Kind string `json:"kind,omitempty"`
// Type string `json:"type,omitempty"`
Status string `json:"status,omitempty"`
// LastTransitionTime string `json:"lastTransitionTime,omitempty"` //might need to change the variable type
Status string `json:"status,omitempty"`
// Message string `json:"message,omitempty"`
ManagedResources []ResourceStatus `json:"managedResources,omitempty"`
// Type string `json:"type,omitempty"`
// LastTransitionTime string `json:"lastTransitionTime,omitempty"` //might need to change the variable type
}

type ServiceStatus struct { //Top level service status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,22 @@ metadata:
"spec": {
"services": [
{
"name": "etcd",
"name": "jaeger",
"spec": {
"etcdCluster": {
"size": 1
"jaeger": {
"strategy": "allinone"
}
}
},
{
"name": "jenkins",
"name": "mongodb-atlas-kubernetes",
"spec": {
"jenkins": {
"service": {
"port": 8081
"atlasDeployment": {
"deploymentSpec": {
"name": "test-deployment"
},
"projectRef": {
"name": "my-project"
}
}
}
Expand All @@ -52,19 +55,19 @@ metadata:
"spec": {
"operators": [
{
"channel": "clusterwide-alpha",
"channel": "stable",
"installMode": "cluster",
"name": "etcd",
"namespace": "etcd-cluster-operator",
"packageName": "etcd",
"name": "jaeger",
"namespace": "default",
"packageName": "jaeger",
"sourceName": "community-operators",
"sourceNamespace": "openshift-marketplace"
},
{
"channel": "alpha",
"name": "jenkins",
"channel": "stable",
"name": "mongodb-atlas-kubernetes",
"namespace": "default",
"packageName": "jenkins-operator",
"packageName": "mongodb-atlas-kubernetes",
"sourceName": "community-operators",
"sourceNamespace": "openshift-marketplace"
}
Expand All @@ -87,10 +90,10 @@ metadata:
{
"operands": [
{
"name": "etcd"
"name": "jaeger"
},
{
"name": "jenkins"
"name": "mongodb-atlas-kubernetes"
}
],
"registry": "example-service"
Expand Down
Loading