Skip to content

Commit f411983

Browse files
author
Cory Schwartz
authored
Merge pull request #60 from coryschwartz/feat/rename-crd
rename CRD
2 parents 7d7f60f + 7b30747 commit f411983

37 files changed

+263
-145
lines changed

PROJECT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
controller: true
1414
domain: ipfs.io
1515
group: cluster
16-
kind: Ipfs
16+
kind: CircuitRelay
1717
path: github.com/redhat-et/ipfs-operator/api/v1alpha1
1818
version: v1alpha1
1919
- api:
@@ -22,7 +22,7 @@ resources:
2222
controller: true
2323
domain: ipfs.io
2424
group: cluster
25-
kind: CircuitRelay
25+
kind: IpfsCluster
2626
path: github.com/redhat-et/ipfs-operator/api/v1alpha1
2727
version: v1alpha1
2828
version: "3"

api/v1alpha1/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ limitations under the License.
1515
*/
1616

1717
// Package v1alpha1 contains API Schema definitions for the cluster v1alpha1 API group
18-
//+kubebuilder:object:generate=true
19-
//+groupName=cluster.ipfs.io
18+
// +kubebuilder:object:generate=true
19+
// +groupName=cluster.ipfs.io
2020
package v1alpha1
2121

2222
import (
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type networkConfig struct {
6363
CircuitRelays int32 `json:"circuitRelays"`
6464
}
6565

66-
type IpfsSpec struct {
66+
type IpfsClusterSpec struct {
6767
// +kubebuilder:validation:Optional
6868
URL string `json:"url"`
6969
Public bool `json:"public"`
@@ -78,32 +78,32 @@ type IpfsSpec struct {
7878
Reprovider ReprovideSettings `json:"reprovider,omitempty"`
7979
}
8080

81-
type IpfsStatus struct {
81+
type IpfsClusterStatus struct {
8282
Conditions []metav1.Condition `json:"conditions,omitempty"`
8383
CircuitRelays []string `json:"circuitRelays,omitempty"`
8484
}
8585

8686
//+kubebuilder:object:root=true
8787
//+kubebuilder:subresource:status
8888

89-
// Ipfs is the Schema for the ipfs API.
90-
type Ipfs struct {
89+
// IpfsCluster is the Schema for the ipfs API.
90+
type IpfsCluster struct {
9191
metav1.TypeMeta `json:",inline"`
9292
metav1.ObjectMeta `json:"metadata,omitempty"`
9393

94-
Spec IpfsSpec `json:"spec,omitempty"`
95-
Status IpfsStatus `json:"status,omitempty"`
94+
Spec IpfsClusterSpec `json:"spec,omitempty"`
95+
Status IpfsClusterStatus `json:"status,omitempty"`
9696
}
9797

9898
//+kubebuilder:object:root=true
9999

100100
// IpfsList contains a list of Ipfs.
101-
type IpfsList struct {
101+
type IpfsClusterList struct {
102102
metav1.TypeMeta `json:",inline"`
103103
metav1.ListMeta `json:"metadata,omitempty"`
104-
Items []Ipfs `json:"items"`
104+
Items []IpfsCluster `json:"items"`
105105
}
106106

107107
func init() {
108-
SchemeBuilder.Register(&Ipfs{}, &IpfsList{})
108+
SchemeBuilder.Register(&IpfsCluster{}, &IpfsClusterList{})
109109
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 20 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
66
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=ipfs-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
9-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.19.0+git
9+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-unknown
1010
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1111
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
1212

bundle/manifests/cluster.ipfs.io_circuitrelays.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
- name: v1alpha1
1818
schema:
1919
openAPIV3Schema:
20-
description: CircuitRelay is the Schema for the circuitrelays API
20+
description: CircuitRelay is the Schema for the circuitrelays API.
2121
properties:
2222
apiVersion:
2323
description: 'APIVersion defines the versioned schema of this representation
@@ -36,7 +36,7 @@ spec:
3636
status:
3737
properties:
3838
addrInfo:
39-
description: This is intended to mimic peer.AddrInfo
39+
description: This is intended to mimic peer.AddrInfo.
4040
properties:
4141
addrs:
4242
items:

bundle/manifests/cluster.ipfs.io_ipfs.yaml renamed to bundle/manifests/cluster.ipfs.io_ipfsclusters.yaml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ metadata:
44
annotations:
55
controller-gen.kubebuilder.io/version: v0.8.0
66
creationTimestamp: null
7-
name: ipfs.cluster.ipfs.io
7+
name: ipfsclusters.cluster.ipfs.io
88
spec:
99
group: cluster.ipfs.io
1010
names:
11-
kind: Ipfs
12-
listKind: IpfsList
13-
plural: ipfs
14-
singular: ipfs
11+
kind: IpfsCluster
12+
listKind: IpfsClusterList
13+
plural: ipfsclusters
14+
singular: ipfscluster
1515
scope: Namespaced
1616
versions:
1717
- name: v1alpha1
1818
schema:
1919
openAPIV3Schema:
20-
description: Ipfs is the Schema for the ipfs API
20+
description: IpfsCluster is the Schema for the ipfs API.
2121
properties:
2222
apiVersion:
2323
description: 'APIVersion defines the versioned schema of this representation
@@ -35,8 +35,24 @@ spec:
3535
properties:
3636
clusterStorage:
3737
type: string
38+
follows:
39+
items:
40+
properties:
41+
name:
42+
type: string
43+
template:
44+
type: string
45+
required:
46+
- name
47+
- template
48+
type: object
49+
type: array
3850
ipfsStorage:
39-
type: string
51+
anyOf:
52+
- type: integer
53+
- type: string
54+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
55+
x-kubernetes-int-or-string: true
4056
networking:
4157
properties:
4258
circuitRelays:
@@ -50,15 +66,32 @@ spec:
5066
replicas:
5167
format: int32
5268
type: integer
69+
reprovider:
70+
description: Reprovider Describes the settings that each IPFS node
71+
should use when reproviding content.
72+
properties:
73+
interval:
74+
description: Interval sets the time between rounds of reproviding
75+
local content to the routing system. Defaults to '12h'.
76+
type: string
77+
strategy:
78+
description: Strategy specifies the reprovider strategy, defaults
79+
to 'all'.
80+
enum:
81+
- all
82+
- pinned
83+
- roots
84+
type: string
85+
type: object
5386
url:
5487
type: string
5588
required:
5689
- clusterStorage
90+
- follows
5791
- ipfsStorage
5892
- networking
5993
- public
6094
- replicas
61-
- url
6295
type: object
6396
status:
6497
properties:
@@ -71,8 +104,8 @@ spec:
71104
description: "Condition contains details for one aspect of the current
72105
state of this API Resource. --- This struct is intended for direct
73106
use as an array at the field path .status.conditions. For example,
74-
type FooStatus struct{ // Represents the observations of a foo's
75-
current state. // Known .status.conditions.type are: \"Available\",
107+
\n type FooStatus struct{ // Represents the observations of a
108+
foo's current state. // Known .status.conditions.type are: \"Available\",
76109
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
77110
// +listType=map // +listMapKey=type Conditions []metav1.Condition
78111
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

0 commit comments

Comments
 (0)