Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/k8s.io/apiextensions-a…
Browse files Browse the repository at this point in the history
…piserver-0.29.3
  • Loading branch information
ukff authored Mar 28, 2024
2 parents 250b662 + 9523407 commit 7055f2a
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/run-govulncheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run govulncheck

on:
pull_request:
branches: [ main ]

jobs:
run-govulncheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@90a06d6ba9543371ab4df8eeca0be07ca6054959
with:
files: |
.github/**
api/**
cmd/**
config/**
controllers/**
deployments/**
examples/**
hack/**
internal/**
module-chart/**
module-resources/**
scripts/**
config.yaml
Dockerfile
go.mod
go.sum
main.go
Makefile
**/*.go
**/*.sh
- name: Run govulncheck
if: steps.changed-files-specific.outputs.any_modified == 'true'
uses: golang/govulncheck-action@v1
with:
go-version-file: 'go.mod'
24 changes: 24 additions & 0 deletions docs/contributor/04-10-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,30 @@ This workflow calls the reusable [workflow](/.github/workflows/run-unit-tests-re

This [workflow](/.github/workflows/markdown-link-check.yaml) is triggered daily at midnight and by each PR on the `main` branch. It checks for dead links in the repository.

## Govulncheck Workflow

This [workflow](/.github/workflows/run-govulncheck.yaml) runs the Govulncheck. It is triggered by PRs on the `main` branch that change at least one of the following:
- `/.github` directory content
- `/api` directory content
- `/cmd` directory content
- `/config` directory content
- `/controllers` directory content
- `/deployments` directory content
- `/examples` directory content
- `/hack` directory content
- `/internal` directory content
- `/module-chart` directory content
- `/module-resources` directory content
- `/scripts` directory content
- `config.yaml` file
- `Dockerfile` file
- `go.mod` file
- `go.sum` file
- `main.go` file
- `Makefile` file
- any `*.go` file
- any `*.sh` file

## Reusable Workflows

There are reusable workflows created. Anyone with access to a reusable workflow can call it from another workflow.
Expand Down
32 changes: 32 additions & 0 deletions docs/user/02-11-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# SAP BTP Service Operator Examples

This document describes notable features shipped with new SAP BTP service operator upgrades discovered during the application of latest versions.

## Secret Templates

Version 0.6.1 introduced a Secret templates feature that allows for modification of a Secret's content that is normally generated from a ServiceBinding instance created for any service. You can now specify a data-driven template as a value of the **secretTemplate** field inside the binding's spec section. Inside the template, you can refer (by using `{{}}` syntax) to credentials stored inside of a ServiceBinding (with `{{credentials.<key>}}`) or information of a given instance (with `{{instance.<key>}}`). The parameters that can be used with the `instance` key are limited to the values set in the [getInstanceInfo](https://github.com/SAP/sap-btp-service-operator/blob/8c0a3d7d7ca54e44143c0e0b7d1e1ef206b362ab/controllers/servicebinding_controller.go#L819) method. Here is an example of a ServiceBinding with the **secretTemplate** field:

```
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
labels:
app.kubernetes.io/name: nice-script
name: nice-script
namespace: default
spec:
externalName: nice-script
secretName: nice-script
secretTemplate: |
apiVersion: v1
kind: Secret
metadata:
labels:
instance_plan: {{ .instance.plan }}
annotations:
instance_name: {{ .instance.instance_name }}
data:
foo: {{ .instance.type }}
bar: {{ .credentials.url }}
serviceInstanceName: dimpled-editor
```
1 change: 1 addition & 0 deletions docs/user/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [Back to Kyma Home](/)
- [SAP BTP Operator Module](README.md)
- [Use BTP Manager to Manage SAP BTP Service Operator](02-10-usage.md)
- [SAP BTP Service Operator Examples](02-11-examples.md)
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.21.6
require (
github.com/go-logr/logr v1.4.1
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.31.1
github.com/onsi/gomega v1.32.0
github.com/prometheus/client_golang v1.19.0
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.27.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk=
github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down

0 comments on commit 7055f2a

Please sign in to comment.