GithubHelp home page GithubHelp logo

sap / cf-service-operator Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 4.0 559 KB

A Kubernetes operator for Cloud Foundry services

Home Page: https://sap.github.io/cf-service-operator/

License: Apache License 2.0

Dockerfile 0.58% Makefile 5.10% Go 92.83% Shell 1.13% HTML 0.36%
sap-cns sap-cs-devops

cf-service-operator's Introduction

Kubernetes Operator For Cloud Foundry™ Services

REUSE status

Disclaimer: Cloud Foundry is a registered trademark of THE LINUX FOUNDATION. Any rights therein are reserved to THE LINUX FOUNDATION. Any use by this project is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between CloudFoundry and this project.

About this project

This repository adds native support for Cloud Foundry spaces, service instances and service bindings to Kubernetes clusters. It contains custom resource definitions

  • spaces.cf.cs.sap.com (kind Space)
  • clusterspaces.cf.cs.sap.com (kind ClusterSpace)
  • serviceinstances.cf.cs.sap.com (kind ServiceInstance)
  • servicebindings.cf.cs.sap.com (kind ServiceBinding)

and an according operator reconciling resources of these types.

A typical usage could look as follows:

---
apiVersion: cf.cs.sap.com/v1alpha1
kind: Space
metadata:
  name: k8s
spec:
  organizationName: my-org 
  authSecretName: k8s-space
---
apiVersion: v1
kind: Secret
metadata:
  name: k8s-space
stringData:
  url: "<cf api url>"
  username: "<username>"
  password: "<password>"
---
apiVersion: cf.cs.sap.com/v1alpha1
kind: ServiceInstance
metadata:
  name: uaa
spec:
  spaceName: k8s
  serviceOfferingName: xsuaa
  servicePlanName: application
---
apiVersion: cf.cs.sap.com/v1alpha1
kind: ServiceBinding
metadata:
  name: uaa
spec:
  serviceInstanceName: uaa

When reconciling these objects, the operator will ensure that according API entities (space, instance, binding) are maintained in the targeted Cloud Foundry environment.

The scope of this project is comparable with the SAP BTP Service Operator. But other than that operator, the Cloud Foundry Service Operator provided by this repository manages services and bindings through Cloud Foundry APIs, instead of using native BTP APIs.

Requirements and Setup

The recommended deployment method is to use the Helm chart:

helm upgrade -i cf-service-operator oci://ghcr.io/sap/cf-service-operator-helm/cf-service-operator

Documentation

The project's documentation can be found here: https://sap.github.io/cf-service-operator.
The API reference is here: https://pkg.go.dev/github.com/sap/cf-service-operator.

Support, Feedback, Contributing

This project is open to feature requests/suggestions, bug reports etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

Copyright 2024 SAP SE or an SAP affiliate company and cf-service-operator contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

cf-service-operator's People

Contributors

cbarbian-sap avatar erp4sme-devops-github-admin-user avatar renovate[bot] avatar santiago-ventura avatar shegox avatar thebigelmo avatar uwefreidank avatar zdenko-kovac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cf-service-operator's Issues

panic while accessing undefined cf metadata annotations/labels

In a couple of places we evaluate cf metadata annotations or labels like

parameterHash := *serviceInstance.Metadata.Annotations[annotationParameterHash]

(https://github.com/SAP/cf-service-operator/blob/main/internal/cf/instance.go#L43)

Under normal circumstances, this does not cause a problem, since the logic in cf-service-operator ensures that the labels/annotations were properly set, before reading them for the first time. However, in case someone changed things manually in the cf api, or if existing instances/bindings were incompletely adopted, the code might dereference a nil pointer, and therefore panic.

This should be handled in a more robust way. Proposal: have a wrapper method for accessing cf labels/annotations which first checks if the according key exists and the respective value is non-nil, and only then dereferences it.

cfclient error (CF-RateLimitV2APIExceeded|10018) during creation of CF space

Description:
(CF-RateLimitV2APIExceeded|10018) Error during SPACE creation

Error requesting users: cfclient error (CF-RateLimitV2APIExceeded|10018): Rate Limit of V2 API Exceeded. Please consider using the V3 API

This is however reconciled after the API rate limit is reset but this creates issues during integration tests as the failure rate is high.

Current Client: github.com/cloudfoundry-community/go-cfclient/v2

Since, V2 is deprecated , could we check if we can start using go-cfclient/v3.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.22.0
github-actions
.github/workflows/build.yaml
  • actions/checkout v4
  • actions/setup-go v5
  • actions/checkout v4
  • docker/setup-buildx-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
  • actions/upload-artifact v4
  • ubuntu 22.04
  • ubuntu 22.04
.github/workflows/publish-website.yaml
  • actions/checkout v4
  • actions/configure-pages v5
  • actions/setup-node v4
  • actions/upload-pages-artifact v3
  • actions/deploy-pages v4
  • ubuntu 22.04
.github/workflows/publish.yaml
  • actions/checkout v4
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • benc-uk/workflow-dispatch v1
  • ubuntu 22.04
  • ubuntu 22.04
  • ubuntu 22.04
.github/workflows/release.yaml
  • actions/checkout v4
  • ubuntu 22.04
gomod
go.mod
  • go 1.21
  • github.com/cloudfoundry-community/go-cfclient/v3 v3.0.0-alpha.5
  • github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1
  • github.com/onsi/ginkgo/v2 v2.15.0
  • github.com/onsi/gomega v1.31.1
  • github.com/pkg/errors v0.9.1
  • k8s.io/api v0.29.0
  • k8s.io/apiextensions-apiserver v0.29.0
  • k8s.io/apimachinery v0.29.0
  • k8s.io/client-go v0.29.0
  • sigs.k8s.io/controller-runtime v0.17.0
npm
website/package.json
  • node 21.7.0
  • autoprefixer 10.4.16
  • postcss 8.4.31
  • postcss-cli 11.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.