Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into federation-service-…
Browse files Browse the repository at this point in the history
…cluster
  • Loading branch information
nmiculinic committed Jan 10, 2020
2 parents 42e8a6c + 7d60914 commit b0cc814
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/internal/ferry/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ spec:
strings when printing the property. This is only for display purpose,
for everything else use conditions.
type: string
required:
- crds
type: object
type: object
served: true
Expand Down
12 changes: 10 additions & 2 deletions hack/codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,21 @@ statik-gen manager config/internal/manager
# -------
# RBAC
$CONTROLLER_GEN rbac:roleName=manager-role paths="./pkg/ferry/..." output:rbac:artifacts:config=config/internal/ferry/rbac
sed -i 's/ClusterRole/Role/g' config/internal/ferry/rbac/role.yaml
# The `|| true` is because the `,s/ClusterRole/Role/g` will error out if there is no match of `ClusterRole` (eg., the file is empty) in the file.
ed config/internal/ferry/rbac/role.yaml <<EOF || true
,s/ClusterRole/Role/g
w
EOF
# Statik (run only when file CONTENT has changed)
statik-gen ferry config/internal/ferry

# Catapult
# -------
# RBAC
$CONTROLLER_GEN rbac:roleName=manager-role paths="./pkg/catapult/..." output:rbac:artifacts:config=config/internal/catapult/rbac
sed -i 's/ClusterRole/Role/g' config/internal/catapult/rbac/role.yaml
# The `|| true` is because the `,s/ClusterRole/Role/g` will error out if there is no match of `ClusterRole` (eg., the file is empty) in the file.
ed config/internal/catapult/rbac/role.yaml <<EOF || true
,s/ClusterRole/Role/g
w
EOF
statik-gen catapult config/internal/catapult
2 changes: 1 addition & 1 deletion pkg/apis/catalog/v1alpha1/catalogentry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type CatalogEntryMetadata struct {
// CatalogEntryStatus defines the observed state of CatalogEntry.
type CatalogEntryStatus struct {
// CRDs holds the information about the underlying CRDs that are offered by this CatalogEntry.
CRDs []CRDInformation `json:"crds"`
CRDs []CRDInformation `json:"crds,omitempty"`

// ObservedGeneration is the most recent generation observed for this CatalogEntry by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Expand Down
3 changes: 1 addition & 2 deletions pkg/internal/resources/ferry/ferry.golden.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
creationTimestamp: null
name: hans-ferry-manager-role
namespace: provider-1000
rules:
- apiGroups:
- kubecarrier.io
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/resources/ferry/statik.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions pkg/internal/resources/manager/manager.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@
strings when printing the property. This is only for display purpose,
for everything else use conditions.
type: string
required:
- crds
type: object
type: object
served: true
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/resources/manager/statik.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestCatalogEntryReconciler(t *testing.T) {
Name: "test-crd-3.test-crd-group-3.test",
Annotations: map[string]string{
"kubecarrier.io/serviceCluster": "test-serviceCluster-3",
catalogEntryReferenceAnnotation: "test-catalogentry",
catalogEntryReferenceAnnotation: "test-catalogentry",
},
Labels: map[string]string{
"kubecarrier.io/provider": "example.provider",
Expand Down

0 comments on commit b0cc814

Please sign in to comment.