Skip to content

Automate some sanity checks - #9

Merged
solsson merged 40 commits into
masterfrom
ci-smoketest
Nov 12, 2019
Merged

Automate some sanity checks#9
solsson merged 40 commits into
masterfrom
ci-smoketest

Conversation

@solsson

@solsson solsson commented Nov 11, 2019

Copy link
Copy Markdown
Collaborator

No description provided.

@solsson

solsson commented Nov 11, 2019

Copy link
Copy Markdown
Collaborator Author

It's completely amazing how fast the docker-composed based setup brings up a cluster that responds to kubectl.

@solsson

solsson commented Nov 12, 2019

Copy link
Copy Markdown
Collaborator Author

Had to give up on docker hub's automated test using k3s. The intended CI step is captured quite well with ./test.sh and does pass in the two local environments I tried.

This method of provisioning ystack is really interesting however, so I'll merge anyway. Also we produce the image solsson/ystack-runner which is useful for example to have skaffold running as part of other build pipelines. Current build solsson/ystack-runner@sha256:3c6673d455a032b4c8dd40aa3ae199fdea177a174ae417d3e467231a72ef6f9f.

@solsson
solsson merged commit 7d10ff9 into master Nov 12, 2019
@solsson
solsson deleted the ci-smoketest branch November 12, 2019 14:11
solsson pushed a commit that referenced this pull request Aug 31, 2026
…ller

First downstream consumer of Yolean/buckety-controller (initial-impl
on main). Swaps the y-kustomize HTTP-fetched setup-topic Job pattern
for the Buckety CRD on the kafka path; blobs path stays on the
existing y-kustomize Job until the s3 buckety driver lands.

What's in:

- buckety-controller/upstream/ vendors deploy/kustomize/{crd,controller}/
  from the buckety-controller repo. The webhook.yaml is intentionally
  not vendored (and the corresponding `- webhook.yaml` line is
  stripped from controller/kustomization.yaml): ystack does not run
  cert-manager, and the upstream webhook requires it for CA-bundle
  injection. Documented in upstream/README.md.

- buckety-controller/ is the local overlay: namespace `buckety`, a
  secretGenerator-driven config Secret with one kadm backend pointing
  at y-bootstrap.kafka.svc.cluster.local:9092, a clusterrolebinding
  subject patch onto the namespaced ServiceAccount, and a
  deployment-patch.yaml that passes --enable-webhook=false so the
  controller starts without a TLS cert (matches the cert-less
  deployment recipe documented in buckety-controller's
  docs/SCAFFOLDING.md after issue #4).

- k3s/15-buckety/ is the new yconverge step. It depends only on
  40-kafka (controller talks to the broker on first reconcile, so
  staging it after kafka avoids early-reconcile noise).

- registry/builds-topic/ replaces its HTTP fetch with a Buckety:
  backend=cluster-kafka, spec.name=ystack.builds-registry.stream.json
  (the friendly operator-chosen name COSI could not give us),
  defaultAccess mints Secret topic-builds-registry with flat keys
  bootstrap+topic that the registry consumes via plain
  secretKeyRef. No init-container shim.

- kafka/validate-topic/ does the same swap with
  spec.name=y-cluster-validate-ystack so the existing
  y-cluster-validate-ystack produce/consume script can keep
  using its hard-coded topic name.

- registry/builds-prep/ drops the setup-topic-prep URL fetch
  (no per-namespace ServiceAccount needed when the controller
  does the topic create). The setup-bucket-prep URL stays until
  the s3 driver lands.

- k3s/60-builds-registry/yconverge.cue replaces the
  41-kafka-y-kustomize dep with 15-buckety. The blobs path
  keeps 31-blobs-y-kustomize.

- bin/y-cluster-validate-ystack swaps the kafka topic create
  check from `kubectl wait Job complete` to
  `kubectl wait Buckety Ready`, and drops the now-orphan
  y-kustomize kafka base check.

- e2e/agents-clusterautomation-acceptance-linux-amd64.sh adds
  one sideload step after provision:
    y-cluster images load $BUCKETY_CONTROLLER_OCI --context=local
  Default path: ~/Yolean/buckety-controller/oci, overridable via
  env. Fails fast with a build hint if the OCI layout is missing.

Verified locally against PR #3 head (commit cb45545, image digest
sha256:11ae9b338310e953b48b26fe31cbde3247fdd09928a1d0c3efd89964d387ccfd):

- 8 yconverge phases green from a clean k3s+docker provision
- y-cluster-validate-ystack: 35 passed / 0 failed (including
  kafka topic create + produce + consume against the
  buckety-provisioned topic)
- Buckety/builds-registry reaches Ready=True in ~5s
- `rpk topic list` shows the operator-chosen names
  (ystack.builds-registry.stream.json,
   y-cluster-validate-ystack) end-to-end
- Issued Secrets carry the flat keys (bootstrap, topic) per
  the kadm driver schema

Not in this commit (deliberate scope):

- s3 driver swap. The buckety-controller s3 driver is still a
  stub returning ErrNotImplemented; blobs-versitygw remains on
  the existing y-kustomize Job pattern. Lands in a follow-up
  once the upstream s3 driver fills in.

- Image pin. The acceptance script sideloads a locally-built
  OCI from ~/Yolean/buckety-controller/oci; once
  buckety-controller cuts a tagged release with the new
  per-commit timestamp tag + pinned digest workflow
  (Yolean/buckety-controller@172e1ca), this overlay should
  switch to vendoring deploy/kustomize/release/ and pinning
  the image by digest. Follow-up.

- Driver-version e2e (SPEC scenario #9 in
  buckety-controller). Not exercised; needs three
  differently-stamped binaries that the upstream
  driver-version harness doesn't yet ship.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant