Skip to content

Commit

Permalink
Merge pull request #573 from xxxxibo/fix-typo
Browse files Browse the repository at this point in the history
fix:typo
  • Loading branch information
bjwswang authored Jan 18, 2024
2 parents 1e9d8c7 + 06dc31f commit ac8f685
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apiserver/pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
// Resource operations

// ResourceGet provides a common way to get a resource
func ResouceGet(ctx context.Context, c dynamic.Interface, resource generated.TypedObjectReferenceInput, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
func ResourceGet(ctx context.Context, c dynamic.Interface, resource generated.TypedObjectReferenceInput, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
if resource.Namespace == nil {
resource.Namespace = &DefaultNamespace
}
Expand Down
4 changes: 2 additions & 2 deletions apiserver/pkg/common/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func MakeEndpoint(ctx context.Context, c dynamic.Interface, owner generated.Type
// retrieve owner to metav1.Object
// object is not nil if `Get` succeeded
var ownerObject metav1.Object
resource, err := ResouceGet(ctx, c, owner, metav1.GetOptions{})
resource, err := ResourceGet(ctx, c, owner, metav1.GetOptions{})
if err == nil {
ownerObject = resource
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func MakeAuthSecret(ctx context.Context, c dynamic.Interface, secret generated.T
return err
}

_, err = ResouceGet(ctx, c, secret, metav1.GetOptions{})
_, err = ResourceGet(ctx, c, secret, metav1.GetOptions{})
if err != nil {
// Create is not found
if apierrors.IsNotFound(err) {
Expand Down
4 changes: 2 additions & 2 deletions apiserver/pkg/datasource/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func CreateDatasource(ctx context.Context, c dynamic.Interface, input generated.
}

func UpdateDatasource(ctx context.Context, c dynamic.Interface, input *generated.UpdateDatasourceInput) (*generated.Datasource, error) {
obj, err := common.ResouceGet(ctx, c, generated.TypedObjectReferenceInput{
obj, err := common.ResourceGet(ctx, c, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "Datasource",
Name: input.Name,
Expand Down Expand Up @@ -306,7 +306,7 @@ func ListDatasources(ctx context.Context, c dynamic.Interface, input generated.L
}

func ReadDatasource(ctx context.Context, c dynamic.Interface, name, namespace string) (*generated.Datasource, error) {
u, err := common.ResouceGet(ctx, c, generated.TypedObjectReferenceInput{
u, err := common.ResourceGet(ctx, c, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "Datasource",
Name: name,
Expand Down
2 changes: 1 addition & 1 deletion apiserver/pkg/embedder/embedder.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func CreateEmbedder(ctx context.Context, c dynamic.Interface, input generated.Cr
}

func UpdateEmbedder(ctx context.Context, c dynamic.Interface, input *generated.UpdateEmbedderInput) (*generated.Embedder, error) {
obj, err := common.ResouceGet(ctx, c, generated.TypedObjectReferenceInput{
obj, err := common.ResourceGet(ctx, c, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "Embedder",
Name: input.Name,
Expand Down
2 changes: 1 addition & 1 deletion apiserver/pkg/llm/llm.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func CreateLLM(ctx context.Context, c dynamic.Interface, input generated.CreateL
}

func UpdateLLM(ctx context.Context, c dynamic.Interface, input *generated.UpdateLLMInput) (*generated.Llm, error) {
obj, err := common.ResouceGet(ctx, c, generated.TypedObjectReferenceInput{
obj, err := common.ResourceGet(ctx, c, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "LLM",
Name: input.Name,
Expand Down
2 changes: 1 addition & 1 deletion apiserver/pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func ListWorkers(ctx context.Context, c dynamic.Interface, input generated.ListW
}

func ReadWorker(ctx context.Context, c dynamic.Interface, name, namespace string) (*generated.Worker, error) {
u, err := common.ResouceGet(ctx, c, generated.TypedObjectReferenceInput{
u, err := common.ResourceGet(ctx, c, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "Worker",
Name: name,
Expand Down
2 changes: 1 addition & 1 deletion pkg/arctl/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func EvalGenTestDataset(home *string, namespace *string, appName *string) *cobra

// read files
app := &basev1alpha1.Application{}
obj, err := common.ResouceGet(ctx, kubeClient, generated.TypedObjectReferenceInput{
obj, err := common.ResourceGet(ctx, kubeClient, generated.TypedObjectReferenceInput{
APIGroup: &common.ArcadiaAPIGroup,
Kind: "Application",
Namespace: namespace,
Expand Down

0 comments on commit ac8f685

Please sign in to comment.