Skip to content

Commit

Permalink
🗑️ remove: webhook 😭
Browse files Browse the repository at this point in the history
  • Loading branch information
anngdinh committed Jul 22, 2024
1 parent 71f5b74 commit eca7a4d
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 1,194 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,37 +65,3 @@ jobs:
${{ env.REPO }}/vngcloud-controller-manager:${{ github.sha }}
${{ env.REPO }}/vngcloud-controller-manager:${{ env.VERSION }}
target: vngcloud-controller-manager

- name: Build and push Docker image
env:
TARGET: vngcloud-cm-webhook
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
VERSION=${{ env.VERSION }}
platforms: linux/amd64
outputs: type=registry
tags: |
ghcr.io/vngcloud/vngcloud-cm-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-cm-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-cm-webhook:${{ env.VERSION }}
target: vngcloud-cm-webhook

- name: Build and push Docker image
env:
TARGET: vngcloud-ic-webhook
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
VERSION=${{ env.VERSION }}
platforms: linux/amd64
outputs: type=registry
tags: |
ghcr.io/vngcloud/vngcloud-ic-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-ic-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-ic-webhook:${{ env.VERSION }}
target: vngcloud-ic-webhook
32 changes: 0 additions & 32 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,38 +70,6 @@ jobs:
${{ env.REPO }}/vngcloud-controller-manager:${{ github.ref_name }}
target: vngcloud-controller-manager

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
VERSION=${{ github.ref_name }}
platforms: linux/amd64
outputs: type=registry
tags: |
ghcr.io/vngcloud/vngcloud-cm-webhook:${{ github.sha }}
ghcr.io/vngcloud/vngcloud-cm-webhook:${{ github.ref_name }}
${{ env.REPO }}/vngcloud-cm-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-cm-webhook:${{ github.ref_name }}
target: vngcloud-cm-webhook

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
VERSION=${{ github.ref_name }}
platforms: linux/amd64
outputs: type=registry
tags: |
ghcr.io/vngcloud/vngcloud-ic-webhook:${{ github.sha }}
ghcr.io/vngcloud/vngcloud-ic-webhook:${{ github.ref_name }}
${{ env.REPO }}/vngcloud-ic-webhook:${{ github.sha }}
${{ env.REPO }}/vngcloud-ic-webhook:${{ github.ref_name }}
target: vngcloud-ic-webhook

create_release:
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ TestResults.xml

/vngcloud-controller-manager
/vngcloud-ingress-controller
/vngcloud-cm-webhook
/vngcloud-ic-webhook
.go
*.crt
*.key
40 changes: 1 addition & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ COPY pkg/ pkg/
RUN make build GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=${GOPROXY} VERSION=${VERSION}
# COPY vngcloud-controller-manager ./vngcloud-controller-manager
# COPY vngcloud-ingress-controller ./vngcloud-ingress-controller
# COPY vngcloud-cm-webhook ./vngcloud-cm-webhook
# COPY vngcloud-ic-webhook ./vngcloud-ic-webhook
# RUN chmod +x ./vngcloud-controller-manager ./vngcloud-ingress-controller ./vngcloud-cm-webhook ./vngcloud-ic-webhook
# RUN chmod +x ./vngcloud-controller-manager ./vngcloud-ingress-controller


################################################################################
Expand Down Expand Up @@ -105,39 +103,3 @@ LABEL name="vngcloud-ingress-controller" \
help="none"

CMD ["/bin/vngcloud-ingress-controller"]

##
## vngcloud-cm-webhook
##
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as vngcloud-cm-webhook

COPY --from=builder /build/vngcloud-cm-webhook /bin/vngcloud-cm-webhook
COPY --from=certs /etc/ssl/certs /etc/ssl/certs

LABEL name="vngcloud-cm-webhook" \
license="Apache Version 2.0" \
maintainers="[email protected]" \
description="vngcloud controller manager webhook" \
distribution-scope="public" \
summary="vngcloud controller manager webhook" \
help="none"

CMD ["/bin/vngcloud-cm-webhook"]

##
## vngcloud-ic-webhook
##
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as vngcloud-ic-webhook

COPY --from=builder /build/vngcloud-ic-webhook /bin/vngcloud-ic-webhook
COPY --from=certs /etc/ssl/certs /etc/ssl/certs

LABEL name="vngcloud-ic-webhook" \
license="Apache Version 2.0" \
maintainers="[email protected]" \
description="vngcloud ingress controller webhook" \
distribution-scope="public" \
summary="vngcloud ingress controller webhook" \
help="none"

CMD ["/bin/vngcloud-ic-webhook"]
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ GOX_LDFLAGS := $(shell echo "$(LDFLAGS) -extldflags \"-static\"")
REGISTRY ?= vcr.vngcloud.vn/81-vks-public
IMAGE_OS ?= linux
IMAGE_NAMES ?= vngcloud-controller-manager \
vngcloud-ingress-controller \
vngcloud-cm-webhook \
vngcloud-ic-webhook
vngcloud-ingress-controller
ARCH ?= amd64
ARCHS ?= amd64
BUILD_CMDS ?= vngcloud-controller-manager \
vngcloud-ingress-controller \
vngcloud-cm-webhook \
vngcloud-ic-webhook
vngcloud-ingress-controller

# CTI targets

Expand Down Expand Up @@ -168,8 +164,6 @@ ifndef HAS_GOX
endif
CGO_ENABLED=0 gox -parallel=$(GOX_PARALLEL) -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) $(if $(TAGS),-tags '$(TAGS)',) -ldflags '$(GOX_LDFLAGS)' $(GIT_HOST)/$(BASE_DIR)/cmd/vngcloud-controller-manager/
CGO_ENABLED=0 gox -parallel=$(GOX_PARALLEL) -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) $(if $(TAGS),-tags '$(TAGS)',) -ldflags '$(GOX_LDFLAGS)' $(GIT_HOST)/$(BASE_DIR)/cmd/vngcloud-ingress-controller/
CGO_ENABLED=0 gox -parallel=$(GOX_PARALLEL) -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) $(if $(TAGS),-tags '$(TAGS)',) -ldflags '$(GOX_LDFLAGS)' $(GIT_HOST)/$(BASE_DIR)/cmd/vngcloud-cm-webhook/
CGO_ENABLED=0 gox -parallel=$(GOX_PARALLEL) -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) $(if $(TAGS),-tags '$(TAGS)',) -ldflags '$(GOX_LDFLAGS)' $(GIT_HOST)/$(BASE_DIR)/cmd/vngcloud-ic-webhook/

.PHONY: dist
dist: build-cross
Expand Down
56 changes: 0 additions & 56 deletions cmd/vngcloud-cm-webhook/admission/admission.go

This file was deleted.

49 changes: 0 additions & 49 deletions cmd/vngcloud-cm-webhook/admission/validation.go

This file was deleted.

80 changes: 0 additions & 80 deletions cmd/vngcloud-cm-webhook/admission/validator_common.go

This file was deleted.

Loading

0 comments on commit eca7a4d

Please sign in to comment.