-
Notifications
You must be signed in to change notification settings - Fork 26
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
deploying services automatically #284
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,8 +171,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform | |
|
||
##@ Deployment | ||
|
||
CLOUD_ID := $(shell oc get clusterversion -o jsonpath='{.items[].spec.clusterID}{"\n"}') | ||
INGRESS_HOST := o2ims.$(shell oc get ingresscontrollers.operator.openshift.io -n openshift-ingress-operator default -o jsonpath='{.status.domain}{"\n"}') | ||
|
||
ifndef ignore-not-found | ||
ignore-not-found = false | ||
ignore-not-found = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be reverted |
||
endif | ||
|
||
.PHONY: install | ||
|
@@ -187,7 +190,12 @@ uninstall: manifests kustomize kubectl ## Uninstall CRDs from the K8s cluster sp | |
deploy: manifests kustomize kubectl ## Deploy controller to the K8s cluster specified in ~/.kube/config. | ||
@$(KUBECTL) create configmap env-config --from-literal=HWMGR_PLUGIN_NAMESPACE=$(HWMGR_PLUGIN_NAMESPACE) --dry-run=client -o yaml > config/manager/env-config.yaml | ||
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} | ||
cp config/manager/inventory.yaml config/manager/inventory.back | ||
sed -i 's/ingressHost:.*/ingressHost: $(INGRESS_HOST)/' config/manager/inventory.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ingress host handling needs to be removed. This will be handled automatically with the patch that I provided you. |
||
cat config/manager/inventory.yaml | ||
$(KUSTOMIZE) build config/$(KUSTOMIZE_OVERLAY) | $(KUBECTL) apply -f - | ||
cp config/manager/inventory.back config/manager/inventory.yaml | ||
rm -f config/manager/inventory.back | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not really sure I understand what is being accomplished with the copying of the inventory.yaml file. Could you explain why this is necessary. |
||
|
||
.PHONY: undeploy | ||
undeploy: kustomize kubectl ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should be removed from your commit |
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: o2ims.oran.openshift.io/v1alpha1 | ||
kind: Inventory | ||
metadata: | ||
labels: | ||
app.kubernetes.io/created-by: oran-o2ims | ||
app.kubernetes.io/instance: o2ims | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/part-of: oran-o2ims | ||
name: inventory | ||
namespace: oran-o2ims | ||
spec: | ||
alarmSubscriptionServerConfig: | ||
enabled: false | ||
deploymentManagerServerConfig: | ||
enabled: true | ||
cloudId: 1122-3444-5555 # your clouldID / globalCloudId | ||
ingressHost: # your IngressHost | ||
metadataServerConfig: | ||
enabled: true | ||
resourceServerConfig: | ||
enabled: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ kind: Kustomization | |
resources: | ||
- manager.yaml | ||
- env-config.yaml | ||
|
||
- inventory.yaml | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
images: | ||
- name: controller | ||
newName: quay.io/openshift-kni/oran-o2ims-operator | ||
newTag: 4.16.0 | ||
newName: quay.io/mmorency0/oran-o2ims | ||
newTag: latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be reverted |
||
|
||
|
||
# This replacement copies the controller image into the `IMAGE` environment variable of the pod, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines need to be removed.