Remove finalizer with patch operation

The kubebuilder documentation on finalizers has the following example code for removing a finalizer from an object. // remove our finalizer from the list and update it. controllerutil.RemoveFinalizer(cronJob, myFinalizerName) if err := r.Update(ctx, cronJob); err != nil { return ctrl.Result{}, err } I found when doing this, if the operation running above this in the Reconcile() function (typically to remove a remote resource from an API) this r.Update() call would return an error like this:...

November 30, 2023

Securing Drupal on Kubernetes

Video Slides

March 20, 2020

Supplemental Groups with Gitlab Runner on OpenShift

Recently I configured gitlab-runner to operate on an openshift cluster. One quirk of this setup is the containers running as random uids, having the side-effect of the build container being unable to clone the project or fetch dependencies. To overcome this issue, we needed to run the build container with a supplemental group which had write access to the $CI_BUILDS_DIR path. Security Context Constraint The cluster administrators set up a securityContextConstraint which allowed the build service account to use supplemental group 80001....

September 18, 2019

K8s Autoscaling Custom Metrics

Lightning talk on autoscaling Kubernetes deployments with custom metrics. Links: Slides PHP-FPM Prometheus Exporter End-to-end tutorial for github.com/directxman12/k8s-prometheus-adapter End-to-end tutorial for github.com/stefanprodan/k8s-prom-hpa PreviousNext custom metric adapter for php-fpm

August 15, 2019