forked from edgelevel/lastpass-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from robertoeguia/add_folder_sync_feature
Add folder sync feature
- Loading branch information
Showing
22 changed files
with
768 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
// LastPassGroupSpec defines the desired state of LastPassGroup | ||
type LastPassGroupSpec struct { | ||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
|
||
GroupRef GroupRef `json:"groupRef,required"` | ||
SyncPolicy SyncPolicy `json:"syncPolicy,omitempty"` | ||
} | ||
|
||
type GroupRef struct { | ||
Group string `json:"group,omitempty"` | ||
WithUsername bool `json:"withUsername,omitempty"` | ||
WithPassword bool `json:"withPassword,omitempty"` | ||
WithUrl bool `json:"withUrl,omitempty"` | ||
WithNote bool `json:"withNote,omitempty"` | ||
} | ||
|
||
// LastPassGroupStatus defines the observed state of LastPassGroup | ||
type LastPassGroupStatus struct { | ||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster | ||
// Important: Run "make" to regenerate code after modifying this file | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
|
||
// LastPassGroup is the Schema for the lastpassgroups API | ||
type LastPassGroup struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec LastPassGroupSpec `json:"spec,omitempty"` | ||
Status LastPassGroupStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// LastPassGroupList contains a list of LastPassGroup | ||
type LastPassGroupList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []LastPassGroup `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&LastPassGroup{}, &LastPassGroupList{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package v1alpha1 | ||
|
||
import "time" | ||
|
||
type SyncPolicy struct { | ||
Enabled bool `json:"enabled,required"` | ||
Refresh time.Duration `json:"refresh,required"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
name: lastpassgroups.edgelevel.com | ||
spec: | ||
group: edgelevel.com | ||
names: | ||
kind: LastPassGroup | ||
listKind: LastPassGroupList | ||
plural: lastpassgroups | ||
singular: lastpassgroup | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: LastPassGroup is the Schema for the lastpassgroups API | ||
properties: | ||
apiVersion: | ||
description: |- | ||
APIVersion defines the versioned schema of this representation of an object. | ||
Servers should convert recognized schemas to the latest internal value, and | ||
may reject unrecognized values. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
type: string | ||
kind: | ||
description: |- | ||
Kind is a string value representing the REST resource this object represents. | ||
Servers may infer this from the endpoint the client submits requests to. | ||
Cannot be updated. | ||
In CamelCase. | ||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: LastPassGroupSpec defines the desired state of LastPassGroup | ||
properties: | ||
groupRef: | ||
properties: | ||
group: | ||
type: string | ||
withNote: | ||
type: boolean | ||
withPassword: | ||
type: boolean | ||
withUrl: | ||
type: boolean | ||
withUsername: | ||
type: boolean | ||
type: object | ||
syncPolicy: | ||
properties: | ||
enabled: | ||
type: boolean | ||
refresh: | ||
description: |- | ||
A Duration represents the elapsed time between two instants | ||
as an int64 nanosecond count. The representation limits the | ||
largest representable duration to approximately 290 years. | ||
format: int64 | ||
type: integer | ||
required: | ||
- enabled | ||
- refresh | ||
type: object | ||
required: | ||
- groupRef | ||
type: object | ||
status: | ||
description: LastPassGroupStatus defines the observed state of LastPassGroup | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# permissions for end users to edit lastpassgroups. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: lastpass-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: lastpassgroup-editor-role | ||
rules: | ||
- apiGroups: | ||
- edgelevel.com | ||
resources: | ||
- lastpassgroups | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- edgelevel.com | ||
resources: | ||
- lastpassgroups/status | ||
verbs: | ||
- get |
Oops, something went wrong.