Skip to content

Commit

Permalink
fix(cvc): set the bind address using a go flag in cvc server config
Browse files Browse the repository at this point in the history
- Remove the entrypoint.sh script in Dockerfile , used to set
  the bind address for cvc api server (backup/restore endpoints)
  reset/overwrite the other flags passed as args to the deployment
  container.

- Updated the cvc operator deployment spec args to include the
  --bind flag to set the server IP using downward API status.podIP

- Updated the cstor-operator service account name changes as
  per the latest release changes.

- Sync with latest changes in node-disk-manager operator yaml

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
  • Loading branch information
prateekpandey14 committed May 12, 2021
1 parent a08d9ae commit 694b330
Show file tree
Hide file tree
Showing 8 changed files with 706 additions and 152 deletions.
4 changes: 1 addition & 3 deletions build/cvc-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ RUN apk add --no-cache \
ca-certificates

COPY cvc-operator /usr/local/bin/cvc-operator
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh

ARG ARCH
ARG DBUILD_DATE
Expand All @@ -38,5 +36,5 @@ LABEL org.label-schema.build-date=$DBUILD_DATE
LABEL org.label-schema.vcs-url=$DBUILD_REPO_URL
LABEL org.label-schema.url=$DBUILD_SITE_URL

ENTRYPOINT entrypoint.sh
ENTRYPOINT ["/usr/local/bin/cvc-operator"]
EXPOSE 5757
2 changes: 1 addition & 1 deletion build/cvc-operator/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ LABEL org.label-schema.build-date=$DBUILD_DATE
LABEL org.label-schema.vcs-url=$DBUILD_REPO_URL
LABEL org.label-schema.url=$DBUILD_SITE_URL

ENTRYPOINT entrypoint.sh
ENTRYPOINT ["/usr/local/bin/cvc-operator"]
EXPOSE 5757
4 changes: 1 addition & 3 deletions build/cvc-operator/cvc-operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ LABEL org.label-schema.vcs-url=$DBUILD_REPO_URL
LABEL org.label-schema.url=$DBUILD_SITE_URL

COPY --from=build /go/src/github.com/openebs/cstor-operator/bin/cvc-operator/cvc-operator /usr/local/bin/cvc-operator
COPY --from=build /go/src/github.com/openebs/cstor-operator/build/cvc-operator/entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT entrypoint.sh
ENTRYPOINT ["/usr/local/bin/cvc-operator"]
EXPOSE 5757
21 changes: 0 additions & 21 deletions build/cvc-operator/entrypoint.sh

This file was deleted.

14 changes: 11 additions & 3 deletions deploy/cstor-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
openebs.io/component-name: cspc-operator
openebs.io/version: dev
spec:
serviceAccountName: openebs-maya-operator
serviceAccountName: openebs-cstor-operator
containers:
- name: cspc-operator
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -85,11 +85,15 @@ spec:
openebs.io/component-name: cvc-operator
openebs.io/version: dev
spec:
serviceAccountName: openebs-maya-operator
serviceAccountName: openebs-cstor-operator
containers:
- name: cvc-operator
imagePullPolicy: IfNotPresent
image: openebs/cvc-operator:ci
args:
- "--v=5"
- "--leader-election=false"
- "--bind=$(OPENEBS_CVC_POD_IP)"
env:
# OPENEBS_IO_BASE_DIR is used to configure base directory for openebs on host path.
# Where OpenEBS can store required files. Default base path will be /var/openebs
Expand All @@ -104,6 +108,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPENEBS_CVC_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: OPENEBS_SERVICEACCOUNT_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -156,7 +164,7 @@ spec:
openebs.io/component-name: cstor-admission-webhook
openebs.io/version: dev
spec:
serviceAccountName: openebs-maya-operator
serviceAccountName: openebs-cstor-operator
containers:
- name: admission-webhook
image: openebs/cstor-webhook:ci
Expand Down
Loading

0 comments on commit 694b330

Please sign in to comment.