Skip to content

Commit 338ad7f

Browse files
authored
Remove HAS controllers (#481)
* Remove HAS controllers Signed-off-by: John Collier <[email protected]> * Update dockerfile Signed-off-by: John Collier <[email protected]> * Fix tests Signed-off-by: John Collier <[email protected]> * Fix tests Signed-off-by: John Collier <[email protected]> * Fix entrypoint Signed-off-by: John Collier <[email protected]> --------- Signed-off-by: John Collier <[email protected]>
1 parent bda93f1 commit 338ad7f

File tree

94 files changed

+11
-23646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+11
-23646
lines changed

.github/workflows/build-cdq-analysis-image.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/pact_postmerge.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -127,76 +127,6 @@ jobs:
127127
fetch-depth: 0
128128
- name: Check if dockerimage build is working
129129
run: docker build -f ./Dockerfile .
130-
build-cdq-analysis-image:
131-
name: Check CDQ Analysis Image Build
132-
runs-on: ubuntu-latest
133-
steps:
134-
- name: Check out code into the Go module directory
135-
uses: actions/checkout@v2
136-
with:
137-
fetch-depth: 0
138-
- name: Set up Go 1.x
139-
uses: actions/setup-go@v2
140-
with:
141-
go-version: 1.18
142-
- name: Change to the cdq-analysis directory
143-
run: cd cdq-analysis/
144-
- name: Set up Docker Buildx
145-
uses: docker/setup-buildx-action@v2
146-
- name: Check if dockerimage build is working
147-
run: docker build -f ./Dockerfile .
148-
pact:
149-
name: Pact tests
150-
runs-on: ubuntu-latest
151-
env:
152-
PR_NUMBER: ${{ github.event.pull_request.number }}
153-
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
154-
PR_CHECK: true
155-
OPERATOR_SDK_VERSION: v1.14.0
156-
steps:
157-
- name: Set up Go 1.x
158-
uses: actions/setup-go@v2
159-
with:
160-
go-version: 1.19
161-
- name: Check out code into the Go module directory
162-
uses: actions/checkout@v2
163-
with:
164-
fetch-depth: 0
165-
- name: Cache Operator SDK ${{ env.OPERATOR_SDK_VERSION }}
166-
uses: actions/cache@v2
167-
id: cache-operator-sdk
168-
with:
169-
path: ~/cache
170-
key: operator-sdk-${{ env.OPERATOR_SDK_VERSION }}
171-
- name: Download Operator SDK ${{ env.OPERATOR_SDK_VERSION }}
172-
if: steps.cache-operator-sdk.outputs.cache-hit != 'true'
173-
run: |
174-
mkdir -p ~/cache
175-
wget https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk_linux_amd64 -O ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} > /dev/null -O ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} > /dev/null
176-
chmod +x ~/cache/operator-sdk-${OPERATOR_SDK_VERSION}
177-
- name: Install Operator SDK ${{ env.OPERATOR_SDK_VERSION }}
178-
run: |
179-
mkdir -p ~/bin
180-
cp ~/cache/operator-sdk-${OPERATOR_SDK_VERSION} ~/bin/operator-sdk
181-
echo "$HOME/bin" >> $GITHUB_PATH
182-
- name: Cache go modules
183-
id: cache-mod
184-
uses: actions/cache@v2
185-
with:
186-
path: ~/go/pkg/mod
187-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
188-
restore-keys: |
189-
${{ runner.os }}-go-
190-
- name: Download dependencies
191-
run: go mod download
192-
if: steps.cache-mod.outputs.cache-hit != 'true'
193-
- name: Test Pact contracts
194-
run: |
195-
go get github.com/pact-foundation/pact-go/[email protected]
196-
go install github.com/pact-foundation/pact-go/[email protected]
197-
sudo /home/runner/go/bin/pact-go -l DEBUG install
198-
COMMIT_SHA=${COMMIT_SHA:0:7}
199-
make pact
200130
kube-linter:
201131
runs-on: ubuntu-latest
202132
steps:

.tekton/push-cdq-analysis.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,19 @@ WORKDIR /workspace
55
# Copy the Go Modules manifests
66
COPY go.mod go.mod
77
COPY go.sum go.sum
8-
COPY cdq-analysis/ cdq-analysis/
98
# cache deps before building and copying source so that we don't need to re-download as much
109
# and so that source changes don't invalidate our downloaded layer
1110
RUN go mod download
1211

1312
# Copy the go source
1413
COPY main.go main.go
1514
# ToDo: Uncomment once API added
16-
COPY controllers/ controllers/
15+
COPY webhooks/ webhooks/
1716
COPY pkg pkg/
18-
COPY gitops gitops/
1917

2018
# Build
2119
RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager main.go
2220

23-
# Build the tini binary
24-
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 as tini-builder
25-
RUN microdnf update --setopt=install_weak_deps=0 -y && microdnf install git cmake make gcc gcc-c++
26-
# build tini
27-
RUN git clone --branch v0.19.0 https://github.com/krallin/tini /tini
28-
WORKDIR /tini
29-
ENV CFLAGS="-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
30-
RUN cmake . && make tini
31-
3221
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9
3322
RUN microdnf update --setopt=install_weak_deps=0 -y && microdnf install git
3423
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
@@ -48,8 +37,6 @@ COPY --from=builder /workspace/manager .
4837
COPY appdata.gitconfig /.gitconfig
4938
RUN chgrp -R 0 /.gitconfig && chmod -R g=u /.gitconfig
5039

51-
# copy tini
52-
COPY --from=tini-builder /tini/tini /usr/bin
5340
WORKDIR /
5441

5542
USER 1001

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ lint:
147147
unit-tests:
148148
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" SKIP_PACT_TESTS=true go test ./... -coverprofile cover.out -v
149149

150-
cdq-analysis-unit-tests:
151-
cd ./cdq-analysis && go test ./... -coverprofile cover.out -v
152-
153150
pact-tests:
154151
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -v --run TestContracts
155152

@@ -159,7 +156,6 @@ pact: manifests generate fmt vet envtest ## Run just Pact tests.
159156
test: manifests generate fmt vet envtest ## Run tests.
160157
make unit-tests
161158
make pact-tests
162-
make cdq-analysis-unit-tests
163159

164160
##@ Build
165161

PROJECT

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,4 @@ plugins:
66
scorecard.sdk.operatorframework.io/v2: {}
77
projectName: application-service
88
repo: github.com/redhat-appstudio/application-service
9-
resources:
10-
- controller: true
11-
domain: redhat.com
12-
group: appstudio
13-
kind: Application
14-
version: v1alpha1
15-
webhooks:
16-
defaulting: true
17-
validation: true
18-
webhookVersion: v1
19-
- controller: true
20-
domain: redhat.com
21-
group: appstudio
22-
kind: Component
23-
version: v1alpha1
24-
webhooks:
25-
defaulting: true
26-
validation: true
27-
webhookVersion: v1
28-
- controller: true
29-
domain: redhat.com
30-
group: appstudio
31-
kind: ComponentDetectionQuery
32-
version: v1alpha1
339
version: "3"

cdq-analysis/Dockerfile

Lines changed: 0 additions & 27 deletions
This file was deleted.

cdq-analysis/entrypoint.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)