这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions kubechain/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@ resources:
kind: LLM
path: github.com/humanlayer/smallchain/kubechain/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: humanlayer.dev
group: kubechain
kind: ContactChannel
path: github.com/humanlayer/smallchain/kubechain/api/v1alpha1
version: v1alpha1
version: "3"
64 changes: 64 additions & 0 deletions kubechain/api/v1alpha1/contactchannel_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright 2025 the Kubechain Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

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.

// ContactChannelSpec defines the desired state of ContactChannel.
type ContactChannelSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of ContactChannel. Edit contactchannel_types.go to remove/update
Foo string `json:"foo,omitempty"`
}

// ContactChannelStatus defines the observed state of ContactChannel.
type ContactChannelStatus 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

// ContactChannel is the Schema for the contactchannels API.
type ContactChannel struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ContactChannelSpec `json:"spec,omitempty"`
Status ContactChannelStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// ContactChannelList contains a list of ContactChannel.
type ContactChannelList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ContactChannel `json:"items"`
}

func init() {
SchemeBuilder.Register(&ContactChannel{}, &ContactChannelList{})
}
89 changes: 89 additions & 0 deletions kubechain/api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.17.1
name: contactchannels.kubechain.humanlayer.dev
spec:
group: kubechain.humanlayer.dev
names:
kind: ContactChannel
listKind: ContactChannelList
plural: contactchannels
singular: contactchannel
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ContactChannel is the Schema for the contactchannels 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: ContactChannelSpec defines the desired state of ContactChannel.
properties:
foo:
description: Foo is an example field of ContactChannel. Edit contactchannel_types.go
to remove/update
type: string
type: object
status:
description: ContactChannelStatus defines the observed state of ContactChannel.
type: object
type: object
served: true
storage: true
subresources:
status: {}
1 change: 1 addition & 0 deletions kubechain/config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resources:
- bases/kubechain.humanlayer.dev_taskruns.yaml
- bases/kubechain.humanlayer.dev_taskruntoolcalls.yaml
- bases/kubechain.humanlayer.dev_mcpservers.yaml
- bases/kubechain.humanlayer.dev_contactchannels.yaml
# +kubebuilder:scaffold:crdkustomizeresource

patches:
Expand Down
27 changes: 27 additions & 0 deletions kubechain/config/rbac/contactchannel_admin_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This rule is not used by the project kubechain itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants full permissions ('*') over kubechain.humanlayer.dev.
# This role is intended for users authorized to modify roles and bindings within the cluster,
# enabling them to delegate specific permissions to other users or groups as needed.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: kubechain
app.kubernetes.io/managed-by: kustomize
name: contactchannel-admin-role
rules:
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels
verbs:
- '*'
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels/status
verbs:
- get
33 changes: 33 additions & 0 deletions kubechain/config/rbac/contactchannel_editor_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This rule is not used by the project kubechain itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants permissions to create, update, and delete resources within the kubechain.humanlayer.dev.
# This role is intended for users who need to manage these resources
# but should not control RBAC or manage permissions for others.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: kubechain
app.kubernetes.io/managed-by: kustomize
name: contactchannel-editor-role
rules:
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels/status
verbs:
- get
29 changes: 29 additions & 0 deletions kubechain/config/rbac/contactchannel_viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This rule is not used by the project kubechain itself.
# It is provided to allow the cluster admin to help manage permissions for users.
#
# Grants read-only access to kubechain.humanlayer.dev resources.
# This role is intended for users who need visibility into these resources
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: kubechain
app.kubernetes.io/managed-by: kustomize
name: contactchannel-viewer-role
rules:
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels
verbs:
- get
- list
- watch
- apiGroups:
- kubechain.humanlayer.dev
resources:
- contactchannels/status
verbs:
- get
5 changes: 5 additions & 0 deletions kubechain/config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ resources:
# default, aiding admins in cluster management. Those roles are
# not used by the {{ .ProjectName }} itself. You can comment the following lines
# if you do not want those helpers be installed with your Project.
- contactchannel_admin_role.yaml
- contactchannel_editor_role.yaml
- contactchannel_viewer_role.yaml
- llm_admin_role.yaml
- llm_editor_role.yaml
- llm_viewer_role.yaml


Loading