Permalink
Browse files

api: v1 -> v1alpha1

When I created the types initially, I was unfamiliar with the
significance of picking a particular API version. As a result, I picked
'v1'. This is not where Shipper is at the moment: we firmly expect some
of our APIs to grow and evolve, potentially drastically, as it matures.

One editorial decision: 'shipperv1' was renamed to 'shipper', not
'shipperv1alpha1'. This is consistent with K8s controllers as far as
I can tell.

Note: this patch assumes a clean cluster, and hence 'v1' is not listed
in the CRD 'versions' array. This is in the interest of keeping the
damage from my early 'v1' decision limited to Booking's clusters; we'll
apply an internal patch to the CRD to support both v1 and v1alpha1 while
we migrate "backwards."
  • Loading branch information...
kanatohodets committed Nov 6, 2018
1 parent 13333ef commit f6460a1d29850189a75d7dea62ba45652eebe250
Showing with 2,004 additions and 1,988 deletions.
  1. +1 −1 .gometalinter.json
  2. +4 −4 .travis.yml
  3. +1 −1 ci/test.sh
  4. +16 −16 cmd/create-cluster-secret/main.go
  5. +4 −4 cmd/shipper-state-metrics/collector.go
  6. +8 −8 cmd/shipper-state-metrics/main.go
  7. +4 −4 cmd/shipper/main.go
  8. +4 −1 crd/Application-crd.yaml
  9. +4 −1 crd/CapacityTarget-crd.yaml
  10. +4 −1 crd/Cluster-crd.yaml
  11. +4 −1 crd/InstallationTarget-crd.yaml
  12. +4 −1 crd/Release-crd.yaml
  13. +4 −1 crd/TrafficTarget-crd.yaml
  14. +1 −1 crd/examples/application.yaml
  15. +1 −1 crd/examples/capacitytarget.yaml
  16. +1 −1 crd/examples/cluster.yaml
  17. +1 −1 crd/examples/installationtarget.yaml
  18. +1 −1 crd/examples/release.yaml
  19. +1 −1 crd/examples/traffictarget.yaml
  20. +2 −2 hack/create-minikube-cluster-secret.pl
  21. +1 −1 hack/update-codegen.sh
  22. +2 −2 pkg/apis/shipper/{v1 → v1alpha1}/doc.go
  23. +1 −1 pkg/apis/shipper/{v1 → v1alpha1}/helpers.go
  24. +2 −2 pkg/apis/shipper/{v1 → v1alpha1}/register.go
  25. +1 −1 pkg/apis/shipper/{v1 → v1alpha1}/types.go
  26. +4 −4 pkg/apis/shipper/{v1 → v1alpha1}/zz_generated.deepcopy.go
  27. +2 −2 pkg/chart/chart.go
  28. +3 −3 pkg/chart/chart_test.go
  29. +4 −4 pkg/chart/fetch.go
  30. +4 −4 pkg/chart/fetch_test.go
  31. +12 −12 pkg/client/clientset/versioned/clientset.go
  32. +8 −8 pkg/client/clientset/versioned/fake/clientset_generated.go
  33. +2 −2 pkg/client/clientset/versioned/fake/register.go
  34. +2 −2 pkg/client/clientset/versioned/scheme/register.go
  35. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/application.go
  36. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/capacitytarget.go
  37. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/cluster.go
  38. +1 −1 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/doc.go
  39. 0 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/doc.go
  40. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_application.go
  41. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_capacitytarget.go
  42. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_cluster.go
  43. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_installationtarget.go
  44. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_release.go
  45. +9 −9 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_shipper_client.go
  46. +25 −25 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/fake/fake_traffictarget.go
  47. +1 −1 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/generated_expansion.go
  48. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/installationtarget.go
  49. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/release.go
  50. +21 −21 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/shipper_client.go
  51. +28 −28 pkg/client/clientset/versioned/typed/shipper/{v1 → v1alpha1}/traffictarget.go
  52. +14 −14 pkg/client/informers/externalversions/generic.go
  53. +6 −6 pkg/client/informers/externalversions/shipper/interface.go
  54. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/application.go
  55. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/capacitytarget.go
  56. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/cluster.go
  57. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/installationtarget.go
  58. +1 −1 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/interface.go
  59. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/release.go
  60. +13 −13 pkg/client/informers/externalversions/shipper/{v1 → v1alpha1}/traffictarget.go
  61. +12 −12 pkg/client/listers/shipper/{v1 → v1alpha1}/application.go
  62. +12 −12 pkg/client/listers/shipper/{v1 → v1alpha1}/capacitytarget.go
  63. +9 −9 pkg/client/listers/shipper/{v1 → v1alpha1}/cluster.go
  64. +1 −1 pkg/client/listers/shipper/{v1 → v1alpha1}/expansion_generated.go
  65. +12 −12 pkg/client/listers/shipper/{v1 → v1alpha1}/installationtarget.go
  66. +12 −12 pkg/client/listers/shipper/{v1 → v1alpha1}/release.go
  67. +11 −13 pkg/client/listers/shipper/{v1 → v1alpha1}/release_expansion.go
  68. +12 −12 pkg/client/listers/shipper/{v1 → v1alpha1}/traffictarget.go
  69. +5 −5 pkg/clusterclientstore/queue.go
  70. +10 −10 pkg/clusterclientstore/store.go
  71. +8 −8 pkg/clusterclientstore/store_test.go
  72. +5 −5 pkg/conditions/capacity.go
  73. +7 −7 pkg/conditions/installation.go
  74. +41 −41 pkg/conditions/strategy.go
  75. +141 −141 pkg/conditions/strategy_test.go
  76. +5 −5 pkg/conditions/traffic.go
  77. +31 −31 pkg/controller/application/application_controller.go
  78. +120 −120 pkg/controller/application/application_controller_test.go
  79. +19 −19 pkg/controller/application/application_controller_utils.go
  80. +21 −21 pkg/controller/capacity/capacity_controller.go
  81. +24 −24 pkg/controller/capacity/capacity_controller_test.go
  82. +8 −8 pkg/controller/capacity/deployment.go
  83. +2 −2 pkg/controller/capacity/sort.go
  84. +4 −4 pkg/controller/clustersecret/clustersecret_controller.go
  85. +10 −10 pkg/controller/clustersecret/clustersecret_controller_test.go
  86. +10 −10 pkg/controller/clustersecret/clustersecret_controller_utils.go
  87. +35 −35 pkg/controller/installation/controller_test.go
  88. +31 −31 pkg/controller/installation/installation_controller.go
  89. +20 −20 pkg/controller/installation/installer.go
  90. +9 −9 pkg/controller/installation/installer_test.go
  91. +2 −2 pkg/controller/installation/sort.go
  92. +1 −1 pkg/controller/installation/testdata/application.yaml
  93. +38 −38 pkg/controller/installation/utils_test.go
  94. +16 −16 pkg/controller/janitor/controller.go
  95. +4 −4 pkg/controller/janitor/controller_test.go
  96. +1 −1 pkg/controller/janitor/testdata/cluster-minikube-a.yaml
  97. +2 −2 pkg/controller/janitor/testdata/installationtarget.yaml
  98. +3 −3 pkg/controller/janitor/utils.go
  99. +6 −6 pkg/controller/janitor/utils_test.go
  100. +2 −2 pkg/controller/release_generation.go
  101. +6 −6 pkg/controller/release_generation_test.go
  102. +20 −20 pkg/controller/schedulecontroller/controller_test.go
  103. +12 −12 pkg/controller/schedulecontroller/schedule_controller.go
  104. +29 −29 pkg/controller/schedulecontroller/scheduler.go
  105. +99 −99 pkg/controller/schedulecontroller/scheduler_test.go
  106. +4 −4 pkg/controller/schedulecontroller/weighted_preflist.go
  107. +10 −10 pkg/controller/strategy/checks.go
  108. +27 −27 pkg/controller/strategy/controller.go
  109. +159 −159 pkg/controller/strategy/controller_test.go
  110. +29 −29 pkg/controller/strategy/executor.go
  111. +90 −90 pkg/controller/strategy/executor_test.go
  112. +7 −7 pkg/controller/strategy/strategy.go
  113. +15 −15 pkg/controller/traffic/pod_label_shifter.go
  114. +18 −18 pkg/controller/traffic/pod_label_shifter_test.go
  115. +27 −27 pkg/controller/traffic/traffic_controller.go
  116. +27 −27 pkg/controller/traffic/traffic_controller_test.go
  117. +3 −3 pkg/errors/release_errors.go
  118. +2 −2 pkg/label/label.go
  119. +4 −4 pkg/metrics/prometheus/restclient.go
  120. +7 −7 pkg/testing/clusterclientstore.go
  121. +7 −7 pkg/util/application/conditions.go
  122. +7 −7 pkg/util/application/generation.go
  123. +4 −4 pkg/util/application/releases.go
  124. +2 −2 pkg/util/release/application.go
  125. +15 −15 pkg/util/release/conditions.go
  126. +3 −3 pkg/util/release/environment.go
  127. +7 −7 pkg/util/release/generation.go
  128. +7 −7 pkg/util/release/sort.go
  129. +68 −68 test/e2e/e2e_test.go
@@ -1,6 +1,6 @@
{
"Vendor": true,
"Enable": ["vet", "vetshadow", "ineffassign", "deadcode", "errcheck", "goconst", "megacheck"],
"Skip": ["pkg/client", "pkg/apis/shipper/v1"],
"Skip": ["pkg/client", "pkg/apis/shipper/v1alpha1"],
"Deadline": "300s"
}
@@ -11,18 +11,18 @@ env:
- RESYNC_PERIOD=30s

before_install:
- curl -Lo $GOPATH/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl
- curl -Lo $GOPATH/bin/minikube https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64
- curl -Lo $GOPATH/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.11.4/bin/linux/amd64/kubectl
- curl -Lo $GOPATH/bin/minikube https://storage.googleapis.com/minikube/releases/v0.28.2/minikube-linux-amd64
- curl -Lo $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
- curl -L https://raw.githubusercontent.com/alecthomas/gometalinter/master/scripts/install.sh | bash -s -- -b $GOPATH/bin
- chmod +x $GOPATH/bin/*
- echo $PATH && ls -la $GOPATH/bin
- sudo -E CHANGE_MINIKUBE_NONE_USER=true $GOPATH/bin/minikube start --vm-driver=none --kubernetes-version=v1.10.0
- sudo -E CHANGE_MINIKUBE_NONE_USER=true $GOPATH/bin/minikube start --vm-driver=none --kubernetes-version=v1.11.4

install: true

before_script:
- git clone --depth=1 https://github.com/kubernetes/kubernetes.git $GOPATH/src/k8s.io/kubernetes

script:
- ./ci/test.sh && ./ci/build.sh && ./ci/package.sh
- ./ci/test.sh && ./ci/build.sh && ./ci/package.sh
@@ -6,7 +6,7 @@ dep status -v

gometalinter \
--vendor \
--skip=pkg/apis/shipper/v1 \
--skip=pkg/apis/shipper/v1alpha1 \
--skip=pkg/client \
--disable-all \
--enable=vet \
@@ -13,7 +13,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"

shipperv1 "github.com/bookingcom/shipper/pkg/apis/shipper/v1"
shipper "github.com/bookingcom/shipper/pkg/apis/shipper/v1alpha1"
"github.com/bookingcom/shipper/pkg/client/clientset/versioned"
)

@@ -64,18 +64,18 @@ func main() {
ObjectMeta: metav1.ObjectMeta{
Name: *clusterName,
Annotations: map[string]string{
shipperv1.SecretChecksumAnnotation: "some-checksum",
shipperv1.SecretClusterSkipTlsVerifyAnnotation: strconv.FormatBool(restCfg.Insecure),
shipper.SecretChecksumAnnotation: "some-checksum",
shipper.SecretClusterSkipTlsVerifyAnnotation: strconv.FormatBool(restCfg.Insecure),
},
},
Type: corev1.SecretTypeOpaque,
Data: secretData,
}

// Only add shipperv1.SecretClusterSkipTlsVerifyAnnotation if the
// Only add shipper.SecretClusterSkipTlsVerifyAnnotation if the
// configuration specifies an insecure connection.
if restCfg.Insecure {
clusterSecret.Annotations[shipperv1.SecretClusterSkipTlsVerifyAnnotation] = strconv.FormatBool(restCfg.Insecure)
clusterSecret.Annotations[shipper.SecretClusterSkipTlsVerifyAnnotation] = strconv.FormatBool(restCfg.Insecure)
}

if _, err := kubeClient.CoreV1().Secrets(*shipperNamespace).Create(clusterSecret); err != nil {
@@ -91,13 +91,13 @@ func main() {
existingSecret.Annotations = map[string]string{}
}

// Delete the shipperv1.SecretClusterSkipTlsVerifyAnnotation if
// Delete the shipper.SecretClusterSkipTlsVerifyAnnotation if
// configuration specifies a secure connection, add the annotation
// it otherwise.
if !restCfg.Insecure {
delete(existingSecret.Annotations, shipperv1.SecretClusterSkipTlsVerifyAnnotation)
delete(existingSecret.Annotations, shipper.SecretClusterSkipTlsVerifyAnnotation)
} else {
existingSecret.Annotations[shipperv1.SecretClusterSkipTlsVerifyAnnotation] = strconv.FormatBool(restCfg.Insecure)
existingSecret.Annotations[shipper.SecretClusterSkipTlsVerifyAnnotation] = strconv.FormatBool(restCfg.Insecure)
}

if _, err := nsSecrets.Update(existingSecret); err != nil {
@@ -110,38 +110,38 @@ func main() {

shipperClient := versioned.NewForConfigOrDie(restCfg)

if existingCluster, err := shipperClient.ShipperV1().Clusters().Get(*clusterName, metav1.GetOptions{}); err != nil {
if existingCluster, err := shipperClient.ShipperV1alpha1().Clusters().Get(*clusterName, metav1.GetOptions{}); err != nil {
if errors.IsNotFound(err) {
cluster := &shipperv1.Cluster{
cluster := &shipper.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: *clusterName,
},
Spec: shipperv1.ClusterSpec{
Spec: shipper.ClusterSpec{
APIMaster: restCfg.Host,
Capabilities: []string{},
Region: "eu-west",
Scheduler: shipperv1.ClusterSchedulerSettings{
Scheduler: shipper.ClusterSchedulerSettings{
Unschedulable: false,
},
},
}
if _, err = shipperClient.ShipperV1().Clusters().Create(cluster); err != nil {
if _, err = shipperClient.ShipperV1alpha1().Clusters().Create(cluster); err != nil {
glog.Fatal(err)
}
glog.Infof("Successfully created cluster %q", *clusterName)
} else {
glog.Fatal(err)
}
} else if *replaceCluster {
existingCluster.Spec = shipperv1.ClusterSpec{
existingCluster.Spec = shipper.ClusterSpec{
APIMaster: restCfg.Host,
Capabilities: []string{},
Region: "eu-west",
Scheduler: shipperv1.ClusterSchedulerSettings{
Scheduler: shipper.ClusterSchedulerSettings{
Unschedulable: false,
},
}
if _, err := shipperClient.ShipperV1().Clusters().Update(existingCluster); err != nil {
if _, err := shipperClient.ShipperV1alpha1().Clusters().Update(existingCluster); err != nil {
glog.Fatal(err)
}
glog.Infof("Successfully replaced cluster %q", *clusterName)
@@ -10,8 +10,8 @@ import (
"k8s.io/apimachinery/pkg/labels"
kubelisters "k8s.io/client-go/listers/core/v1"

shipperv1 "github.com/bookingcom/shipper/pkg/apis/shipper/v1"
shipperlisters "github.com/bookingcom/shipper/pkg/client/listers/shipper/v1"
shipper "github.com/bookingcom/shipper/pkg/apis/shipper/v1alpha1"
shipperlisters "github.com/bookingcom/shipper/pkg/client/listers/shipper/v1alpha1"
)

var (
@@ -141,7 +141,7 @@ func (ssm ShipperStateMetrics) collectReleases(ch chan<- prometheus.Metric) {
appName = "unknown"
}

clusters := strings.Split(rel.Annotations[shipperv1.ReleaseClustersAnnotation], ",")
clusters := strings.Split(rel.Annotations[shipper.ReleaseClustersAnnotation], ",")
if len(clusters) == 0 || len(clusters) == 1 && clusters[0] == "" {
clusters = []string{"unknown"}
}
@@ -294,7 +294,7 @@ func getNamespaces(lister kubelisters.NamespaceLister) ([]*corev1.Namespace, err
return nil, err
}

nsBlacklist := []string{"kube-system", "kube-public", "kube-dns", shipperv1.ShipperNamespace}
nsBlacklist := []string{"kube-system", "kube-public", "kube-dns", shipper.ShipperNamespace}

filtered := make([]*corev1.Namespace, 0, len(nss))
NS:
@@ -15,7 +15,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"

shipperv1 "github.com/bookingcom/shipper/pkg/apis/shipper/v1"
shipper "github.com/bookingcom/shipper/pkg/apis/shipper/v1alpha1"
shipperclientset "github.com/bookingcom/shipper/pkg/client/clientset/versioned"
shipperinformers "github.com/bookingcom/shipper/pkg/client/informers/externalversions"
)
@@ -25,7 +25,7 @@ var (
kubeconfig = flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
resyncPeriod = flag.String("resync", "5m", "Informer's cache re-sync in Go's duration format.")
addr = flag.String("addr", ":8890", "Addr to expose /metrics on.")
ns = flag.String("namespace", shipperv1.ShipperNamespace, "Namespace for Shipper resources.")
ns = flag.String("namespace", shipper.ShipperNamespace, "Namespace for Shipper resources.")
)

func main() {
@@ -61,12 +61,12 @@ func main() {
kubeInformerFactory := kubeinformers.NewSharedInformerFactory(kubeClient, resync)

ssm := ShipperStateMetrics{
appsLister: shipperInformerFactory.Shipper().V1().Applications().Lister(),
relsLister: shipperInformerFactory.Shipper().V1().Releases().Lister(),
itsLister: shipperInformerFactory.Shipper().V1().InstallationTargets().Lister(),
ctsLister: shipperInformerFactory.Shipper().V1().CapacityTargets().Lister(),
ttsLister: shipperInformerFactory.Shipper().V1().TrafficTargets().Lister(),
clustersLister: shipperInformerFactory.Shipper().V1().Clusters().Lister(),
appsLister: shipperInformerFactory.Shipper().V1alpha1().Applications().Lister(),
relsLister: shipperInformerFactory.Shipper().V1alpha1().Releases().Lister(),
itsLister: shipperInformerFactory.Shipper().V1alpha1().InstallationTargets().Lister(),
ctsLister: shipperInformerFactory.Shipper().V1alpha1().CapacityTargets().Lister(),
ttsLister: shipperInformerFactory.Shipper().V1alpha1().TrafficTargets().Lister(),
clustersLister: shipperInformerFactory.Shipper().V1alpha1().Clusters().Lister(),

nssLister: kubeInformerFactory.Core().V1().Namespaces().Lister(),
secretsLister: kubeInformerFactory.Core().V1().Secrets().Lister(),
@@ -27,7 +27,7 @@ import (
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue"

shipperv1 "github.com/bookingcom/shipper/pkg/apis/shipper/v1"
shipper "github.com/bookingcom/shipper/pkg/apis/shipper/v1alpha1"
"github.com/bookingcom/shipper/pkg/chart"
shipperclientset "github.com/bookingcom/shipper/pkg/client/clientset/versioned"
shipperscheme "github.com/bookingcom/shipper/pkg/client/clientset/versioned/scheme"
@@ -63,7 +63,7 @@ var (
kubeconfig = flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
certPath = flag.String("cert", "", "Path to the TLS certificate for target clusters.")
keyPath = flag.String("key", "", "Path to the TLS private key for target clusters.")
ns = flag.String("namespace", shipperv1.ShipperNamespace, "Namespace for Shipper resources.")
ns = flag.String("namespace", shipper.ShipperNamespace, "Namespace for Shipper resources.")
resyncPeriod = flag.String("resync", "30s", "Informer's cache re-sync in Go's duration format.")
enabledControllers = flag.String("enable", strings.Join(controllers, ","), "comma-seperated list of controllers to run (if not all)")
disabledControllers = flag.String("disable", "", "comma-seperated list of controllers to disable")
@@ -172,7 +172,7 @@ func main() {
return kubernetes.NewForConfig(&shallowCopy)
},
kubeInformerFactory.Core().V1().Secrets(),
shipperInformerFactory.Shipper().V1().Clusters(),
shipperInformerFactory.Shipper().V1alpha1().Clusters(),
*ns,
restTimeout,
)
@@ -456,7 +456,7 @@ func startInstallationController(cfg *cfg) (bool, error) {
return false, nil
}

dynamicClientBuilderFunc := func(gvk *schema.GroupVersionKind, config *rest.Config, cluster *shipperv1.Cluster) dynamic.Interface {
dynamicClientBuilderFunc := func(gvk *schema.GroupVersionKind, config *rest.Config, cluster *shipper.Cluster) dynamic.Interface {
config.APIPath = dynamic.LegacyAPIPathResolverFunc(*gvk)
config.GroupVersion = &schema.GroupVersion{Group: gvk.Group, Version: gvk.Version}

@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Namespaced
names:
@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Namespaced
names:
@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Cluster
names:
@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Namespaced
names:
@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Namespaced
names:
@@ -7,7 +7,10 @@ spec:
# group name to use for REST API: /apis/<group>/<version>
group: shipper.booking.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
versions:
- name: v1alpha1
served: true
storage: true
# either Namespaced or Cluster
scope: Namespaced
names:
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: Application
metadata:
name: reviewsapi
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: CapacityTarget
metadata:
name: capacity-v0.0.1 # a SHA1 or git tag from the CI/CD pipeline
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: Cluster
metadata:
name: eu-ams-a
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: InstallationTarget
metadata:
name: "0.0.1" # a SHA1 or git tag from the CI/CD pipeline
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: Release
status:
phase: WaitingForStrategy
@@ -1,4 +1,4 @@
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: TrafficTarget
metadata:
name: traffic-v0.0.1 # a SHA1 or git tag from the CI/CD pipeline
@@ -96,7 +96,7 @@
shipper.booking.com/cluster-secret.checksum: some_checksum_hash
type: Opaque
---
apiVersion: shipper.booking.com/v1
apiVersion: shipper.booking.com/v1alpha1
kind: Cluster
metadata:
name: %s
@@ -105,4 +105,4 @@
capabilities: []
region: eu-west
scheduler:
unschedulable: false
unschedulable: false
@@ -1,4 +1,4 @@
vendor/k8s.io/code-generator/generate-groups.sh all \
github.com/bookingcom/shipper/pkg/client \
github.com/bookingcom/shipper/pkg/apis \
shipper:v1
shipper:v1alpha1
@@ -1,5 +1,5 @@
// +k8s:deepcopy-gen=package,register

// Package v1 is the v1 version of the API.
// Package v1alpha1 is the v1alpha1 version of the API.
// +groupName=shipper.booking.com
package v1
package v1alpha1
@@ -1,4 +1,4 @@
package v1
package v1alpha1

import (
encodingjson "encoding/json"
@@ -1,4 +1,4 @@
package v1
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -9,7 +9,7 @@ import (
)

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: shipper.GroupName, Version: "v1"}
var SchemeGroupVersion = schema.GroupVersion{Group: shipper.GroupName, Version: "v1alpha1"}

// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
Oops, something went wrong.

0 comments on commit f6460a1

Please sign in to comment.