The initial proposal is the following (excerpt from the issue above):
apiVersion: apps.openshift.io/v1alpha1| apiVersion: shipper.booking.com/v1alpha1 | |
| kind: CapacityTarget | |
| metadata: | |
| creationTimestamp: 2019-02-12T15:43:39Z | |
| generation: 1 | |
| labels: | |
| shipper-app: reviews-api | |
| shipper-release: reviews-api-fba08f42-0 | |
| shipper-release-hash: fba08f42 |
| type CRDToWatchMapper { | |
| c *Controller | |
| } | |
| func (m *CRDToWatchMapper) Map(obj handler.MapObject) []reconcile.Request { | |
| crdGvk := extractGVKFromCRD(obj.Object) | |
| m.c.Watch( | |
| createSourceForGVK(crdGvk), | |
| &handler.EnqueueRequestsFromMapFunc{ToRequests: &SBRRequestMapper{}}, | |
| ) |
| package main | |
| import ( | |
| "bytes" | |
| "testing" | |
| "text/template" | |
| "github.com/stretchr/testify/require" | |
| ) |
| #------------------------------------------------------------------------------------------------------------- | |
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | |
| #------------------------------------------------------------------------------------------------------------- | |
| # Update the VARIANT arg in devcontainer.json to pick a Python version: 3, 3.8, 3.7, 3.6 | |
| # To fully customize the contents of this image, use the following Dockerfile instead: | |
| # https://github.com/microsoft/vscode-dev-containers/tree/v0.112.0/containers/python-3/.devcontainer/base.Dockerfile | |
| ARG VARIANT="3" | |
| FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} |
The initial proposal is the following (excerpt from the issue above):
apiVersion: apps.openshift.io/v1alpha1| nginx: | |
| image: nginx | |
| restart: always | |
| ports: | |
| - "80:80" | |
| networks: | |
| - host | |
| package annotations | |
| import ( | |
| "fmt" | |
| "k8s.io/apimachinery/pkg/api/meta" | |
| "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | |
| "k8s.io/apimachinery/pkg/runtime/schema" | |
| "k8s.io/client-go/dynamic" | |
| ) |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "compounds": [ | |
| { | |
| "name": "Operator/E2e", | |
| "configurations": [ | |
| "Operator", |
| diff --git a/test/e2e/servicebindingrequest_test.go b/test/e2e/servicebindingrequest_test.go | |
| index d73cc88b..dc8f345e 100644 | |
| --- a/test/e2e/servicebindingrequest_test.go | |
| +++ b/test/e2e/servicebindingrequest_test.go | |
| @@ -257,7 +257,7 @@ func updateSBRSecret( | |
| t *testing.T, | |
| f *framework.Framework, | |
| namespacedName types.NamespacedName, | |
| -) { | |
| +) error { |
| func loadDescriptor(anns map[string]string, path string, descriptor string, root string) { | |
| if !strings.HasPrefix(descriptor, "binding:") { | |
| return | |
| } | |
| n := annotations.ServiceBindingOperatorAnnotationPrefix + root + "." + path | |
| v := strings.Split(descriptor, ":") | |
| if descriptor == "binding:env:attribute" { | |
| // treat here |