Skip to content

Commit 9a27df4

Browse files
authored
operator: add env to config/manager/manager.yaml (#417)
* operator: add env to config/manager/manager.yaml it not being there causes it to not be present in install.yaml, which in turn breaks the injection in kctf-cluster * fix build-installer calls kctf-operator/dist/ is redundant, so remove it calling build-installer from the build-operator action is a noop, as it is not commited later ideally we'd commit the result, but that'd require a bigger rework of the image update action * Automated commit: update images.
1 parent 89c1d81 commit 9a27df4

File tree

12 files changed

+20
-8263
lines changed

12 files changed

+20
-8263
lines changed

.github/workflows/update-images.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ jobs:
194194
sudo mv operator-sdk /usr/local/bin/
195195
make test
196196
make docker-build IMG=kctf-operator
197-
make build-installer IMG=kctf-operator
198-
mv dist/install.yaml ../dist/resources/install.yaml
199197
200198
- id: push
201199
name: Push images

dist/challenge-templates/pwn/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN /usr/sbin/userdel -r ubuntu && /usr/sbin/useradd --no-create-home -u 1000 us
1919
COPY flag /
2020
COPY chal /home/user/
2121

22-
FROM gcr.io/kctf-docker/challenge@sha256:5117cc6e9f35c62fd8ce47603b020c1875d243392d1b6275b4cb89e0d6b488ca
22+
FROM gcr.io/kctf-docker/challenge@sha256:9f15314c26bd681a043557c9f136e7823414e9e662c08dde54d14a6bfd0b619f
2323

2424
COPY --from=chroot / /chroot
2525

dist/challenge-templates/pwn/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:0c38967d7ca24193ee663ba184369df0c1914af96c4938dca3554b164596732e
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:66b34a47e7bbb832012905e229da0bbed80c5c3cddd4703127ca4026ba528cfc
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/challenge-templates/web/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ COPY web-servers /web-servers
3939

4040
COPY flag /
4141

42-
FROM gcr.io/kctf-docker/challenge@sha256:5117cc6e9f35c62fd8ce47603b020c1875d243392d1b6275b4cb89e0d6b488ca
42+
FROM gcr.io/kctf-docker/challenge@sha256:9f15314c26bd681a043557c9f136e7823414e9e662c08dde54d14a6bfd0b619f
4343

4444
RUN apt-get update \
4545
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends tzdata apache2 \

dist/challenge-templates/web/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:0c38967d7ca24193ee663ba184369df0c1914af96c4938dca3554b164596732e
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:66b34a47e7bbb832012905e229da0bbed80c5c3cddd4703127ca4026ba528cfc
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/challenge-templates/xss-bot/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/challenge@sha256:5117cc6e9f35c62fd8ce47603b020c1875d243392d1b6275b4cb89e0d6b488ca
14+
FROM gcr.io/kctf-docker/challenge@sha256:9f15314c26bd681a043557c9f136e7823414e9e662c08dde54d14a6bfd0b619f
1515

1616
RUN apt-get update && apt-get install -y gnupg2 wget
1717

dist/challenge-templates/xss-bot/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:0c38967d7ca24193ee663ba184369df0c1914af96c4938dca3554b164596732e
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:66b34a47e7bbb832012905e229da0bbed80c5c3cddd4703127ca4026ba528cfc
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/resources/install.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8222,7 +8222,12 @@ spec:
82228222
- --leader-elect
82238223
command:
82248224
- /manager
8225-
image: gcr.io/kctf-docker/kctf-operator@sha256:eca42a9795c0150a803c35e83080495c664327f4067b9c676d8566daec39008e
8225+
env:
8226+
- name: ALLOWED_IPS
8227+
value: 0.0.0.0/0
8228+
- name: SECURITY_POLICY
8229+
value: DISABLED
8230+
image: gcr.io/kctf-docker/kctf-operator@sha256:6ee63bab2ffb69af6210c6b90d6145bf7653ea738b35976180a2c428740217e0
82268231
livenessProbe:
82278232
httpGet:
82288233
path: /healthz

kctf-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
169169
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
170170
mkdir -p dist
171171
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
172-
$(KUSTOMIZE) build config/default > dist/install.yaml
172+
$(KUSTOMIZE) build config/default > ../dist/resources/install.yaml
173173

174174
##@ Deployment
175175

kctf-operator/config/manager/manager.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ spec:
3131
- /manager
3232
args:
3333
- --leader-elect
34+
env:
35+
- name: ALLOWED_IPS
36+
value: 0.0.0.0/0
37+
- name: SECURITY_POLICY
38+
value: DISABLED
3439
image: controller:latest
3540
name: manager
3641
securityContext:

kctf-operator/dist/install.yaml

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

kctf-operator/resources/constants.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ package resources
55
// == || These are set by automation || ==
66
// .. vv ........................... vv ..
77

8-
const DOCKER_CERTBOT_IMAGE = "gcr.io/kctf-docker/certbot@sha256:fdf7b50056c99c7e2b4e16ce1fbbf046334ca73bb3bc067f56e51e06720edf2d"
9-
const DOCKER_GCSFUSE_IMAGE = "gcr.io/kctf-docker/gcsfuse@sha256:cf43a4f5c68438cac676988fb9c6d144766252934d482b9532268e4d001a5ee9"
8+
const DOCKER_CERTBOT_IMAGE = "gcr.io/kctf-docker/certbot@sha256:86f883af58f630babd55a20ae7d89974d9cc35608c25cb405fe3faf90d0ceef0"
9+
const DOCKER_GCSFUSE_IMAGE = "gcr.io/kctf-docker/gcsfuse@sha256:6cb70b79588dc30e4ea64d85f2d0d1aff928d9002b75b697ce50009e8b88b208"
1010

1111
// .. ^^ ........................... ^^ ..
1212
// == || These are set by automation || ==

0 commit comments

Comments
 (0)