Skip to content

Commit

Permalink
api: refactor to ingresscontroller.operator.openshift.io API
Browse files Browse the repository at this point in the history
Replace the v1alpha1 clusteringress.ingress.openshift.io type with the new
ingresscontroller.operator.openshift.io API from openshift/api.

This commit is intended to be the absolute minimum work to switch to the new
API. Internal references to clusteringresses, routers, and any user-facing
references to things renamed in the new API are not covered by this commit.
  • Loading branch information
ironcladlou committed Mar 11, 2019
1 parent a3932ac commit 8246fb3
Show file tree
Hide file tree
Showing 55 changed files with 3,180 additions and 825 deletions.
10 changes: 4 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Makefile
Expand Up @@ -16,7 +16,6 @@ build:
.PHONY: generate
generate:
hack/update-generated-bindata.sh
hack/update-codegen.sh

.PHONY: test
test: verify
Expand All @@ -39,7 +38,6 @@ clean:
verify:
hack/verify-gofmt.sh
hack/verify-generated-bindata.sh
hack/verify-codegen.sh

.PHONY: uninstall
uninstall:
Expand Down
8 changes: 4 additions & 4 deletions assets/defaults/cluster-ingress.yaml
@@ -1,7 +1,7 @@
# ClusterIngress with default values
# IngressController with default values
# Installer config specific values are applied at runtime.
kind: ClusterIngress
apiVersion: ingress.openshift.io/v1alpha1
kind: IngressController
apiVersion: operator.openshift.io/v1
metadata:
name: default
namespace: openshift-ingress-operator
Expand All @@ -15,4 +15,4 @@ spec:
nodeSelector:
matchLabels:
"node-role.kubernetes.io/worker": ""
replicas: 2

6 changes: 3 additions & 3 deletions hack/uninstall.sh
Expand Up @@ -8,11 +8,11 @@ oc scale --replicas 0 -n openshift-cluster-version deployments/cluster-version-o

# Uninstall the cluster-ingress-operator
oc delete -n openshift-ingress-operator deployments/ingress-operator
oc patch -n openshift-ingress-operator clusteringresses/default --patch '{"metadata":{"finalizers": []}}' --type=merge
oc patch -n openshift-ingress-operator ingresscontroller/default --patch '{"metadata":{"finalizers": []}}' --type=merge
# TODO: this leaves DNS dangling
oc patch -n openshift-ingress services/router-default --patch '{"metadata":{"finalizers": []}}' --type=merge
oc delete clusteroperator.config.openshift.io/ingress
oc delete --force --grace-period=0 -n openshift-ingress-operator clusteringresses/default
oc delete --force --grace-period=0 -n openshift-ingress-operator ingresscontroller/default

if [ "$WHAT" == "all" ]; then
oc delete namespaces/openshift-ingress-operator
Expand All @@ -30,7 +30,7 @@ if [ "$WHAT" == "all" ]; then
oc delete clusterrolebindings/openshift-ingress-operator
oc delete clusterrolebindings/openshift-ingress-router
oc delete clusterrolebindings/router-monitoring
oc delete customresourcedefinition.apiextensions.k8s.io/clusteringresses.ingress.openshift.io
oc delete customresourcedefinition.apiextensions.k8s.io/ingresscontroller.operator.openshift.io
fi

oc delete -n openshift-config-managed configmaps/router-ca
Expand Down
70 changes: 0 additions & 70 deletions hack/update-codegen.sh

This file was deleted.

4 changes: 0 additions & 4 deletions hack/verify-codegen.sh

This file was deleted.

8 changes: 4 additions & 4 deletions manifests/00-cluster-role.yaml
Expand Up @@ -53,17 +53,17 @@ rules:
- watch

- apiGroups:
- ingress.openshift.io
- operator.openshift.io
resources:
- clusteringresses
- ingresscontrollers
verbs:
- list
- watch

- apiGroups:
- ingress.openshift.io
- operator.openshift.io
resources:
- clusteringresses/status
- ingresscontrollers/status
verbs:
- update

Expand Down
16 changes: 8 additions & 8 deletions manifests/00-custom-resource-definition.yaml
@@ -1,19 +1,19 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusteringresses.ingress.openshift.io
name: ingresscontrollers.operator.openshift.io
spec:
group: ingress.openshift.io
group: operator.openshift.io
names:
kind: ClusterIngress
listKind: ClusterIngressList
plural: clusteringresses
singular: clusteringress
kind: IngressController
listKind: IngressControllerList
plural: ingresscontrollers
singular: ingresscontroller
scope: Namespaced
version: v1alpha1
version: v1
subresources:
status: {}
scale:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
statusReplicasPath: .status.availableReplicas
labelSelectorPath: .status.labelSelector
2 changes: 1 addition & 1 deletion manifests/01-role.yaml
Expand Up @@ -6,7 +6,7 @@ metadata:
namespace: openshift-ingress-operator
rules:
- apiGroups:
- ingress.openshift.io
- operator.openshift.io
resources:
- "*"
verbs:
Expand Down
10 changes: 0 additions & 10 deletions pkg/apis/addtoscheme_ingress_v1alpha1.go

This file was deleted.

13 changes: 0 additions & 13 deletions pkg/apis/apis.go

This file was deleted.

0 comments on commit 8246fb3

Please sign in to comment.