github.com/fabianvf/ocp-release-operator-sdk@v0.0.0-20190426141702-57620ee2f090/internal/pkg/scaffold/helm/gopkgtoml.go (about) 1 // Copyright 2019 The Operator-SDK Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package helm 16 17 import ( 18 "github.com/operator-framework/operator-sdk/internal/pkg/scaffold" 19 "github.com/operator-framework/operator-sdk/internal/pkg/scaffold/input" 20 ) 21 22 // GopkgToml - the Gopkg.toml file for a hybrid operator 23 type GopkgToml struct { 24 input.Input 25 } 26 27 func (s *GopkgToml) GetInput() (input.Input, error) { 28 if s.Path == "" { 29 s.Path = scaffold.GopkgTomlFile 30 } 31 s.TemplateBody = gopkgTomlTmpl 32 return s.Input, nil 33 } 34 35 const gopkgTomlTmpl = `[[constraint]] 36 name = "github.com/operator-framework/operator-sdk" 37 # The version rule is used for a specific release and the master branch for in between releases. 38 branch = "v0.7.x" #osdk_branch_annotation 39 # version = "=v0.7.0" #osdk_version_annotation 40 41 [[override]] 42 name = "k8s.io/api" 43 version = "kubernetes-1.13.1" 44 45 [[override]] 46 name = "k8s.io/apimachinery" 47 version = "kubernetes-1.13.1" 48 49 [[override]] 50 name = "k8s.io/apiextensions-apiserver" 51 version = "kubernetes-1.13.1" 52 53 [[override]] 54 name = "k8s.io/apiserver" 55 version = "kubernetes-1.13.1" 56 57 [[override]] 58 name = "k8s.io/client-go" 59 version = "kubernetes-1.13.1" 60 61 [[override]] 62 name = "k8s.io/cli-runtime" 63 version = "kubernetes-1.13.1" 64 65 # We need overrides for the following imports because dep can't resolve them 66 # correctly. The easiest way to get this right is to use the versions that 67 # k8s.io/helm uses. See https://github.com/helm/helm/blob/v2.13.1/glide.lock 68 [[override]] 69 name = "k8s.io/kubernetes" 70 revision = "c6d339953bd4fd8c021a6b5fb46d7952b30be9f9" 71 72 [[override]] 73 name = "github.com/russross/blackfriday" 74 revision = "300106c228d52c8941d4b3de6054a6062a86dda3" 75 76 [[override]] 77 name = "github.com/docker/distribution" 78 revision = "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" 79 80 [[override]] 81 name = "github.com/docker/docker" 82 revision = "a9fbbdc8dd8794b20af358382ab780559bca589d" 83 84 [prune] 85 go-tests = true 86 unused-packages = true 87 `