Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/kuttl_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,45 @@ jobs:
- name: Versions from .tool-versions
uses: endorama/asdf-parse-tool-versions@v1
id: versions
- name: Install asdf & tools
uses: asdf-vm/actions/install@v2
- name: add to PATH
run: |
mkdir -p ${HOME}/bin
echo "${HOME}/bin" >> "$GITHUB_PATH"
echo "${HOME}/.asdf/shims" >> "$GITHUB_PATH"
# This duplicated ugliness will be removed once we'll switch to mise
- name: Install asdf
run: |
cd /tmp/
wget https://github.com/asdf-vm/asdf/releases/download/v0.19.0/asdf-v0.19.0-linux-amd64.tar.gz
tar xzf asdf-v0.19.0-linux-amd64.tar.gz
install asdf "${HOME}/bin/"
- name: Install tools
run: |
echo "Installing all ASDF plugins ..."
for tool in `cat .tool-versions |cut -d" " -f1`; do asdf plugin add $tool; done
echo "Installing ASDF tools ..."
asdf install
echo "Finished instlling ASDF tools"
- name: custom environment variables
uses: krisalay/export-env@v1.0.0
with:
filename: e2e-testing/env
- uses: helm/kind-action@v1.4.0
- uses: helm/kind-action@v1.10.0
if: inputs.kind_image == ''
with:
node_image: "${{ env.KIND_CUSTOM_IMAGE }}"
version: "v${{ env.KIND_VERSION }}"
cluster_name: kuttl
- uses: helm/kind-action@v1.4.0
- uses: helm/kind-action@v1.10.0
if: inputs.kind_image != ''
with:
node_image: ${{ inputs.kind_image }}
version: "v${{ env.KIND_VERSION }}"
cluster_name: kuttl
- name: add to PATH
run: |
mkdir -p ${HOME}/bin
echo "${HOME}/bin" >> "$GITHUB_PATH"
- name: install istio (custom version)
run: |
asdf install istioctl ${{ inputs.istio_ver }}
asdf local istioctl ${{ inputs.istio_ver }}
asdf set istioctl ${{ inputs.istio_ver }}
istioctl version --remote=false
if: inputs.istio_ver != ''
- name: Setup Cluster
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/multiple-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,23 @@ on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
pull_request:
branches:
- main

jobs:
kuttl:
strategy:
fail-fast: false
matrix:
versions:
# K8s 1.35 (latest) with Istio 1.24
- kind_image: "kindest/node:v1.35.0"
istio: "1.24.0"
# K8s 1.29 with Istio 1.20
- kind_image: "kindest/node:v1.29.0"
istio: "1.20.0"
# K8s 1.25.3 with Istio 1.16.2
- kind_image: "kindest/node:v1.25.3"
istio: "1.16.2"
uses: ./.github/workflows/kuttl_workflow.yaml
Expand Down
42 changes: 38 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,49 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install asdf & tools
uses: asdf-vm/actions/install@v2
- name: add to PATH
run: |
mkdir -p ${HOME}/bin
echo "${HOME}/bin" >> "$GITHUB_PATH"
echo "${HOME}/.asdf/shims" >> "$GITHUB_PATH"
# This duplicated ugliness will be removed once we'll switch to mise
- name: Install asdf
run: |
cd /tmp/
wget https://github.com/asdf-vm/asdf/releases/download/v0.19.0/asdf-v0.19.0-linux-amd64.tar.gz
tar xzf asdf-v0.19.0-linux-amd64.tar.gz
install asdf "${HOME}/bin/"
- name: Install tools
run: |
echo "Installing all ASDF plugins ..."
for tool in `cat .tool-versions |cut -d" " -f1`; do asdf plugin add $tool; done
echo "Installing ASDF tools ..."
asdf install
echo "Finished instlling ASDF tools"
- run: make test lint
pre-merge-tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install asdf & tools
uses: asdf-vm/actions/install@v2
- name: add to PATH
run: |
mkdir -p ${HOME}/bin
echo "${HOME}/bin" >> "$GITHUB_PATH"
echo "${HOME}/.asdf/shims" >> "$GITHUB_PATH"
# This duplicated ugliness will be removed once we'll switch to mise
- name: Install asdf
run: |
cd /tmp/
wget https://github.com/asdf-vm/asdf/releases/download/v0.19.0/asdf-v0.19.0-linux-amd64.tar.gz
tar xzf asdf-v0.19.0-linux-amd64.tar.gz
install asdf "${HOME}/bin/"
- name: Install tools
run: |
echo "Installing all ASDF plugins ..."
for tool in `cat .tool-versions |cut -d" " -f1`; do asdf plugin add $tool; done
echo "Installing ASDF tools ..."
asdf install
echo "Finished instlling ASDF tools"
- name: Verify pre-merge tasks are committed.
run: |
make prepare
Expand Down
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
golang 1.25.6
act 0.2.26
kuttl 0.15.0
operator-sdk 1.33.0
kind 0.24.0
kuttl 0.18.0
operator-sdk 1.38.0
kind 0.31.0
istioctl 1.24.0
golangci-lint 2.8.0
yq 4.40.5
6 changes: 3 additions & 3 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ resources:
- bases/riskified.com_dynamicenvs.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
patches:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
#- patches/webhook_in_dynamicenvs.yaml
#- path: patches/webhook_in_dynamicenvs.yaml
#+kubebuilder:scaffold:crdkustomizewebhookpatch

# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- patches/cainjection_in_dynamicenvs.yaml
- path: patches/cainjection_in_dynamicenvs.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch

# the following config is for teaching kustomize how to do kustomization for CRDs.
Expand Down
10 changes: 5 additions & 5 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ bases:
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus

patchesStrategicMerge:
patches:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
# - manager_auth_proxy_patch.yaml
# - path: manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
#- manager_config_patch.yaml
#- path: manager_config_patch.yaml

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- manager_webhook_patch.yaml
- path: manager_webhook_patch.yaml

# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
# 'CERTMANAGER' needs to be enabled to use ca injection
- webhookcainjection_patch.yaml
- path: webhookcainjection_patch.yaml

# the following config is for teaching kustomize how to do var substitution
vars:
Expand Down
3 changes: 2 additions & 1 deletion e2e-testing/env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
KIND_CUSTOM_IMAGE=kindest/node:v1.26.3
KIND_CUSTOM_IMAGE=kindest/node:v1.35.0
KIND_VERSION=0.31.0
2 changes: 2 additions & 0 deletions extensions/deployment_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type DeploymentExtensionData struct {
Matches []riskifiedv1alpha1.IstioMatch
// The subset that contains the data of our deployment
Subset riskifiedv1alpha1.Subset
// DynamicEnv name
DynamicEnvName string
}

// ExtendOverridingDeployment is a function that could be used to customize the overriding deployment. Optionally, using
Expand Down
25 changes: 13 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ module github.com/riskified/dynamic-environment

go 1.25.0

toolchain go1.25.6

require (
github.com/go-logr/logr v1.4.3
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/onsi/ginkgo/v2 v2.27.2
github.com/onsi/gomega v1.38.2
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_golang v1.23.2
istio.io/api v1.24.0
istio.io/client-go v1.24.0
k8s.io/api v0.35.0
Expand All @@ -25,14 +27,13 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
Expand All @@ -45,17 +46,17 @@ require (
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/spf13/pflag v1.0.9 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.47.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
Expand All @@ -66,12 +67,12 @@ require (
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.38.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/protobuf v1.36.8 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.31.0 // indirect
k8s.io/apiextensions-apiserver v0.35.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
Expand Down
Loading
Loading