chore: update all references to kn-plugin-func (#1311)

* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: fix instances_test.go

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: still some stray kn-plugin-func

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
Lance Ball 2022-10-13 12:31:53 -04:00 committed by GitHub
parent 4961298264
commit 5adec03c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
133 changed files with 11225 additions and 11224 deletions

View File

@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/knative-sandbox/kn-plugin-func
repository_url: https://github.com/knative/func
options:
commits:
filters:

View File

@ -19,6 +19,6 @@ jobs:
run: |
if ! go test -run "^\QTestFileSystems\E$/^\Qembedded\E$"; then
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
echo "Consult https://github.com/knative-sandbox/kn-plugin-func/blob/main/docs/CONTRIBUTING.md#templates ."
echo "Consult https://github.com/knative/func/blob/main/docs/CONTRIBUTING.md#templates ."
exit 1
fi

View File

@ -1,3 +1,3 @@
defaultBaseImage: gcr.io/distroless/static:nonroot
baseImageOverrides:
knative.dev/kn-plugin-func/cmd/func: docker.io/library/alpine:latest
knative.dev/func/cmd/func: docker.io/library/alpine:latest

View File

@ -1,11 +1,11 @@
# Func
[![CI Status](https://github.com/knative-sandbox/kn-plugin-func/actions/workflows/ci.yaml/badge.svg)](https://github.com/knative-sandbox/kn-plugin-func/actions/workflows/ci.yaml)
[![Client API Documentation](https://pkg.go.dev/badge/knative.dev/kn-plugin-func?utm_source=godoc)](https://pkg.go.dev/knative.dev/kn-plugin-func)
[![Issues](https://img.shields.io/github/issues/knative-sandbox/kn-plugin-func.svg)](https://github.com/knative-sandbox/kn-plugin-func/issues)
[![License](https://img.shields.io/github/license/knative-sandbox/kn-plugin-func)](https://github.com/knative-sandbox/kn-plugin-func/blob/main/LICENSE)
[![Releases](https://img.shields.io/github/v/release/knative-sandbox/kn-plugin-func.svg?label=Release)](https://github.com/knative-sandbox/kn-plugin-func/releases)
[![codecov](https://codecov.io/gh/knative-sandbox/kn-plugin-func/branch/main/graph/badge.svg)](https://codecov.io/gh/knative-sandbox/kn-plugin-func)
[![CI Status](https://github.com/knative/func/actions/workflows/ci.yaml/badge.svg)](https://github.com/knative/func/actions/workflows/ci.yaml)
[![Client API Documentation](https://pkg.go.dev/badge/knative.dev/func?utm_source=godoc)](https://pkg.go.dev/knative.dev/func)
[![Issues](https://img.shields.io/github/issues/knative/func.svg)](https://github.com/knative/func/issues)
[![License](https://img.shields.io/github/license/knative/func)](https://github.com/knative/func/blob/main/LICENSE)
[![Releases](https://img.shields.io/github/v/release/knative/func.svg?label=Release)](https://github.com/knative/func/releases)
[![codecov](https://codecov.io/gh/knative/func/branch/main/graph/badge.svg)](https://codecov.io/gh/knative/func)
`func` is a Client Library and CLI enabling the development and deployment of Functions.

View File

@ -9,7 +9,7 @@ import (
"strconv"
"strings"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
const (

View File

@ -4,8 +4,8 @@ import (
"errors"
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
fn "knative.dev/func"
"knative.dev/func/builders"
)
// TestImage_Named ensures that a builder image is returned when

View File

@ -14,9 +14,9 @@ import (
"github.com/docker/docker/client"
"github.com/heroku/color"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/docker"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/docker"
)
// DefaultName when no WithName option is provided to NewBuilder

View File

@ -5,8 +5,8 @@ import (
"testing"
pack "github.com/buildpacks/pack/pkg/client"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
fn "knative.dev/func"
"knative.dev/func/builders"
)
// Test_BuilderImageDefault ensures that a Function bing built which does not

View File

@ -14,7 +14,7 @@ import (
"runtime/debug"
"time"
"knative.dev/kn-plugin-func/config"
"knative.dev/func/config"
)
const (

View File

@ -10,11 +10,11 @@ import (
"testing"
"time"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/buildpacks"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/knative"
. "knative.dev/kn-plugin-func/testing"
fn "knative.dev/func"
"knative.dev/func/buildpacks"
"knative.dev/func/docker"
"knative.dev/func/knative"
. "knative.dev/func/testing"
)
/*

View File

@ -19,10 +19,10 @@ import (
"time"
cloudevents "github.com/cloudevents/sdk-go/v2"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/mock"
. "knative.dev/kn-plugin-func/testing"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/mock"
. "knative.dev/func/testing"
)
const (

View File

@ -10,12 +10,12 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/kn-plugin-func/buildpacks"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/s2i"
"knative.dev/func/buildpacks"
"knative.dev/func/config"
"knative.dev/func/s2i"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
fn "knative.dev/func"
"knative.dev/func/builders"
)
func NewBuildCmd(newClient ClientFactory) *cobra.Command {

View File

@ -7,8 +7,8 @@ import (
"gotest.tools/v3/assert"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/mock"
fn "knative.dev/func"
"knative.dev/func/mock"
)
// TestBuild_ImageFlag ensures that the image flag is used when specified.

View File

@ -5,15 +5,15 @@ import (
"net/http"
"os"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/buildpacks"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/docker/creds"
fnhttp "knative.dev/kn-plugin-func/http"
"knative.dev/kn-plugin-func/knative"
"knative.dev/kn-plugin-func/openshift"
"knative.dev/kn-plugin-func/pipelines/tekton"
"knative.dev/kn-plugin-func/progress"
fn "knative.dev/func"
"knative.dev/func/buildpacks"
"knative.dev/func/docker"
"knative.dev/func/docker/creds"
fnhttp "knative.dev/func/http"
"knative.dev/func/knative"
"knative.dev/func/openshift"
"knative.dev/func/pipelines/tekton"
"knative.dev/func/progress"
)
// ClientConfig settings for use with NewClient

View File

@ -10,8 +10,8 @@ import (
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/knative"
fn "knative.dev/func"
"knative.dev/func/knative"
)
func CompleteFunctionList(cmd *cobra.Command, args []string, toComplete string) (strings []string, directive cobra.ShellCompDirective) {

View File

@ -9,7 +9,7 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type functionLoader interface {

View File

@ -13,9 +13,9 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/kn-plugin-func/utils"
fn "knative.dev/func"
"knative.dev/func/k8s"
"knative.dev/func/utils"
)
func NewConfigEnvsCmd(loadSaver functionLoaderSaver) *cobra.Command {

View File

@ -9,8 +9,8 @@ import (
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/utils"
fn "knative.dev/func"
"knative.dev/func/utils"
)
func NewConfigLabelsCmd(loaderSaver functionLoaderSaver) *cobra.Command {

View File

@ -14,7 +14,7 @@ import (
"github.com/Netflix/go-expect"
"github.com/hinshun/vt10x"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type mockFunctionLoaderSaver struct {

View File

@ -9,8 +9,8 @@ import (
"testing"
"github.com/ory/viper"
fn "knative.dev/kn-plugin-func"
fnCmd "knative.dev/kn-plugin-func/cmd"
fn "knative.dev/func"
fnCmd "knative.dev/func/cmd"
)
func TestListEnvs(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/k8s"
fn "knative.dev/func"
"knative.dev/func/k8s"
)
func NewConfigVolumesCmd() *cobra.Command {

View File

@ -12,9 +12,9 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/utils"
fn "knative.dev/func"
"knative.dev/func/config"
"knative.dev/func/utils"
)
// ErrNoRuntime indicates that the language runtime flag was not passed.

View File

@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
"knative.dev/kn-plugin-func/utils"
"knative.dev/func/utils"
)
// TestCreate_Execute ensures that an invocation of create with minimal settings

View File

@ -8,8 +8,8 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/config"
fn "knative.dev/func"
"knative.dev/func/config"
)
func NewDeleteCmd(newClient ClientFactory) *cobra.Command {

View File

@ -4,8 +4,8 @@ import (
"os"
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/mock"
fn "knative.dev/func"
"knative.dev/func/mock"
)
// TestDelete_ByName ensures that running delete specifying the name of the

View File

@ -17,14 +17,14 @@ import (
"github.com/spf13/cobra"
"knative.dev/client/pkg/util"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/buildpacks"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/docker/creds"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/kn-plugin-func/s2i"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/buildpacks"
"knative.dev/func/config"
"knative.dev/func/docker"
"knative.dev/func/docker/creds"
"knative.dev/func/k8s"
"knative.dev/func/s2i"
)
func NewDeployCmd(newClient ClientFactory) *cobra.Command {
@ -42,7 +42,7 @@ SYNOPSIS
[--platform] [-c|--confirm] [-v|--verbose]
DESCRIPTION
Deploys a function to the currently configured Knative-enabled cluster.
By default the function in the current working directory is deployed, or at
@ -56,7 +56,7 @@ DESCRIPTION
determine the final built image tag for the function. This final image name
can be provided explicitly using --image, in which case it is used in place
of --registry.
To run deploy using an interactive mode, use the --confirm (-c) option.
This mode is useful for the first deployment in particular, since subsdequent
deployments remember most of the settings provided.

View File

@ -11,9 +11,9 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/mock"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/mock"
)
const TestRegistry = "example.com/alice"

View File

@ -9,8 +9,8 @@ import (
"os/signal"
"syscall"
"knative.dev/kn-plugin-func/cmd"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/cmd"
"knative.dev/func/docker"
)
// Statically-populated build metadata set by `make build`.

View File

@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
func NewInfoCmd(newClient ClientFactory) *cobra.Command {

View File

@ -10,9 +10,9 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/utils"
fn "knative.dev/func"
"knative.dev/func/config"
"knative.dev/func/utils"
)
func NewInvokeCmd(newClient ClientFactory) *cobra.Command {

View File

@ -10,8 +10,8 @@ import (
"sync/atomic"
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/mock"
fn "knative.dev/func"
"knative.dev/func/mock"
)
// TestInvoke command executes the invocation path.

View File

@ -8,7 +8,7 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
func NewLanguagesCmd(newClient ClientFactory) *cobra.Command {

View File

@ -3,7 +3,7 @@ package cmd
import (
"testing"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
// TestLanguages_Default ensures that the default behavior of listing

View File

@ -13,7 +13,7 @@ import (
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
func NewListCmd(newClient ClientFactory) *cobra.Command {

View File

@ -11,7 +11,7 @@ import (
"github.com/hinshun/vt10x"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/docker"
)
func Test_newPromptForCredentials(t *testing.T) {

View File

@ -9,8 +9,8 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/config"
fn "knative.dev/func"
"knative.dev/func/config"
)
// command constructors

View File

@ -3,7 +3,7 @@ package cmd
import (
"testing"
. "knative.dev/kn-plugin-func/testing"
. "knative.dev/func/testing"
)
// TestRepository_List ensures that the 'list' subcommand shows the client's

View File

@ -8,14 +8,14 @@ import (
"text/template"
"time"
"knative.dev/kn-plugin-func/cmd/templates"
"knative.dev/func/cmd/templates"
"github.com/ory/viper"
"github.com/spf13/cobra"
"golang.org/x/term"
"k8s.io/apimachinery/pkg/util/sets"
"knative.dev/client/pkg/util"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type RootCommandConfig struct {
@ -170,7 +170,7 @@ func deriveName(explicitName string, path string) string {
// deriveNameAndAbsolutePathFromPath returns resolved function name and absolute path
// to the function project root. The input parameter path could be one of:
// 'relative/path/to/foo', '/absolute/path/to/foo', 'foo' or ''
// 'relative/path/to/foo', '/absolute/path/to/foo', 'foo' or ”.
func deriveNameAndAbsolutePathFromPath(path string) (string, string) {
var absPath string
@ -201,8 +201,9 @@ func deriveNameAndAbsolutePathFromPath(path string) (string, string) {
//
// Derivation logic:
// deriveImage attempts to arrive at a final, full image name:
// format: [registry]/[username]/[functionName]:[tag]
// example: quay.io/myname/my.function.name:tag.
//
// format: [registry]/[username]/[functionName]:[tag]
// example: quay.io/myname/my.function.name:tag.
//
// Registry can optionally be omitted, in which case DefaultRegistry
// will be prepended.
@ -368,11 +369,11 @@ func (v Version) StringVerbose() string {
//
// Usage Example:
//
// languages := []string{ "go", "node", "rust" },
// survey.Select{
// Options: options,
// Default: surveySelectDefaut(cfg.Language, languages),
// }
// languages := []string{ "go", "node", "rust" },
// survey.Select{
// Options: options,
// Default: surveySelectDefaut(cfg.Language, languages),
// }
//
// Summary:
//
@ -385,10 +386,11 @@ func (v Version) StringVerbose() string {
//
// The above example chooses the default for the Survey (--confirm) question
// in a way that works with user-provided flag and environment variable values.
// `cfg.Language` is the current value set in the config struct, which is
// populated from (in ascending order of precedence):
// static flag default, associated environment variable, or command flag.
// `languages` are the options which are being used by the survey select.
//
// `cfg.Language` is the current value set in the config struct, which is
// populated from (in ascending order of precedence):
// static flag default, associated environment variable, or command flag.
// `languages` are the options which are being used by the survey select.
//
// This cascade allows for the Survey questions to be properly pre-initialzed
// with their associated environment variables or flags. For example,

View File

@ -12,8 +12,8 @@ import (
"github.com/ory/viper"
"knative.dev/client/pkg/util"
fn "knative.dev/kn-plugin-func"
. "knative.dev/kn-plugin-func/testing"
fn "knative.dev/func"
. "knative.dev/func/testing"
)
func TestRoot_PersistentFlags(t *testing.T) {

View File

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"knative.dev/client/pkg/util"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
func NewRunCmd(newClient ClientFactory) *cobra.Command {

View File

@ -6,8 +6,8 @@ import (
"os"
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/mock"
fn "knative.dev/func"
"knative.dev/func/mock"
)
func TestRun_Run(t *testing.T) {

View File

@ -12,7 +12,7 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
// ErrTemplateRepoDoesNotExist is a sentinel error if a template repository responds with 404 status code
@ -34,7 +34,7 @@ DESCRIPTION
To specify a URI of a single, specific repository for which templates
should be displayed, use the --repository flag.
Installed repositories are by default located at ~/.func/repositories
($XDG_CONFIG_HOME/.func/repositories). This can be overridden with
$FUNC_REPOSITORIES_PATH.

View File

@ -6,7 +6,7 @@ import (
"gotest.tools/v3/assert"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
// TestTemplates_Default ensures that the default behavior is listing all

View File

@ -4,9 +4,9 @@ import (
"path/filepath"
"testing"
"knative.dev/kn-plugin-func/config"
"knative.dev/func/config"
. "knative.dev/kn-plugin-func/testing"
. "knative.dev/func/testing"
)
// TestNewDefaults ensures that the default Config

View File

@ -13,8 +13,8 @@ import (
"runtime"
"strings"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/config"
"knative.dev/func/docker"
dockerConfig "github.com/containers/image/v5/pkg/docker/config"
containersTypes "github.com/containers/image/v5/types"

View File

@ -26,10 +26,10 @@ import (
"testing"
"time"
"knative.dev/kn-plugin-func/config"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/docker/creds"
. "knative.dev/kn-plugin-func/testing"
"knative.dev/func/config"
"knative.dev/func/docker"
"knative.dev/func/docker/creds"
. "knative.dev/func/testing"
"github.com/docker/docker-credential-helpers/credentials"
)

View File

@ -13,19 +13,19 @@ import (
"github.com/docker/docker/client"
"golang.org/x/crypto/ssh"
fnssh "knative.dev/kn-plugin-func/ssh"
fnssh "knative.dev/func/ssh"
)
var ErrNoDocker = errors.New("docker/podman API not available")
// NewClient creates a new docker client.
// reads the DOCKER_HOST envvar but it may or may not return it as dockerHost.
// - For local connection (unix socket and windows named pipe) it returns the
// DOCKER_HOST directly.
// - For ssh connections it reads the DOCKER_HOST from the ssh remote.
// - For TCP connections it returns "" so it defaults in the remote (note that
// one should not be use client.DefaultDockerHost in this situation). This is
// needed beaus of TCP+tls connections.
// - For local connection (unix socket and windows named pipe) it returns the
// DOCKER_HOST directly.
// - For ssh connections it reads the DOCKER_HOST from the ssh remote.
// - For TCP connections it returns "" so it defaults in the remote (note that
// one should not be use client.DefaultDockerHost in this situation). This is
// needed beaus of TCP+tls connections.
func NewClient(defaultHost string) (dockerClient client.CommonAPIClient, dockerHostInRemote string, err error) {
var _url *url.URL

View File

@ -6,8 +6,8 @@ import (
"testing"
"time"
"knative.dev/kn-plugin-func/docker"
. "knative.dev/kn-plugin-func/testing"
"knative.dev/func/docker"
. "knative.dev/func/testing"
)
// Test that we are starting podman service on behalf of user

View File

@ -18,8 +18,8 @@ import (
"golang.org/x/crypto/ssh"
"knative.dev/kn-plugin-func/docker"
. "knative.dev/kn-plugin-func/testing"
"knative.dev/func/docker"
. "knative.dev/func/testing"
)
func TestNewDockerClientWithPodmanMachine(t *testing.T) {

View File

@ -21,7 +21,7 @@ import (
"github.com/docker/docker/client"
"golang.org/x/crypto/ssh"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/docker"
)
func TestNewDockerClientWithSSH(t *testing.T) {

View File

@ -12,7 +12,7 @@ import (
"time"
"github.com/docker/docker/client"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/docker"
)
// Test that we are creating client in accordance

View File

@ -8,7 +8,7 @@ import (
winio "github.com/Microsoft/go-winio"
"github.com/docker/docker/client"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/docker"
)
func TestNewClientWinPipe(t *testing.T) {

View File

@ -18,7 +18,7 @@ import (
"github.com/google/go-containerregistry/pkg/v1/remote"
gcrTypes "github.com/google/go-containerregistry/pkg/v1/types"
"knative.dev/kn-plugin-func/docker"
"knative.dev/func/docker"
)
func TestPlatform(t *testing.T) {

View File

@ -13,7 +13,7 @@ import (
"os"
"regexp"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"

View File

@ -32,8 +32,8 @@ import (
"github.com/google/go-containerregistry/pkg/registry"
"github.com/google/go-containerregistry/pkg/v1/remote"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/docker"
fn "knative.dev/func"
"knative.dev/func/docker"
)
func TestGetRegistry(t *testing.T) {

View File

@ -14,7 +14,7 @@ import (
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
const (

View File

@ -10,8 +10,8 @@ import (
"os"
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/docker"
fn "knative.dev/func"
"knative.dev/func/docker"
)
// Docker Run Integraiton Test

View File

@ -32,11 +32,11 @@ The primary interface for Knative Functions is the `func` CLI.
[Download][func-download] the most recent version and install it some place
within your `$PATH`.
[func-download]: https://github.com/knative-sandbox/kn-plugin-func/releases/latest
[func-download]: https://github.com/knative/func/releases/latest
```sh
# Be sure to download the correct binary for your operating system
curl -L -o - func.gz https://github.com/knative-sandbox/kn-plugin-func/releases/latest/download/func_linux_amd64.gz | gunzip > func && chmod 755 func
curl -L -o - func.gz https://github.com/knative/func/releases/latest/download/func_linux_amd64.gz | gunzip > func && chmod 755 func
sudo mv func /usr/local/bin
```
@ -78,8 +78,8 @@ export FUNC_REGISTRY=docker.io/developer
With your Knative enabled cluster up and running, you can now create a new
Function Project. Let's start by creating a project directory. Function name
must consist of lower case alphanumeric characters or '-',
and must start and end with an alphanumeric character
must consist of lower case alphanumeric characters or '-',
and must start and end with an alphanumeric character
(e.g. 'my-name', or '123-abc', regex used for validation is `[a-z0-9]([-a-z0-9]*[a-z0-9])?`).
@ -184,7 +184,7 @@ func create -l node -t http
```
You can also create a Quarkus, SpringBoot, Python or a Golang project by providing
`quarkus`, `springboot`, `python` or `go` respectively to the `-l` flag.
`quarkus`, `springboot`, `python` or `go` respectively to the `-l` flag.
To create a project with a template for CloudEvents, provide `events` to the `-t` flag.
### `func build`

View File

@ -11,8 +11,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/cmd"
fn "knative.dev/func"
"knative.dev/func/cmd"
)
var (

View File

@ -27,7 +27,7 @@ kubectl config set-context --current --namespace=func
### Serving
Docs: https://knative.dev/docs/install/any-kubernetes-cluster/ )
Docs: https://knative.dev/docs/install/any-kubernetes-cluster/ )
Serving with Kourier networking
```
@ -55,9 +55,9 @@ First edit `knative/config-domain.yaml` to contain your domain of choice and the
```
kubectl apply -f knative/config-domain.yaml
```
Note that this step is [pending automation](https://github.com/knative-sandbox/kn-plugin-func/issues/47)
Note that this step is [pending automation](https://github.com/knative/func/issues/47)
### DNS
### DNS
For external routing to the cluster, register domain(s) to be used with a registrar and configure a DNS CNAME to the DNS or IP returned from:
(May also register a wildcard subdomain match).

View File

@ -14,9 +14,9 @@ Installed in this way, Knative Functions are managed as a plugin of the Knative
## Prebuilt Binary
Download the latest binary appropriate for your system from the [Latest Release](https://github.com/knative-sandbox/kn-plugin-func/releases/latest/).
Download the latest binary appropriate for your system from the [Latest Release](https://github.com/knative/func/releases/latest/).
Each version is built and made available as a prebuilt binary. See [All Releases](https://github.com/knative-sandbox/kn-plugin-func/releases/).
Each version is built and made available as a prebuilt binary. See [All Releases](https://github.com/knative/func/releases/).
## From Source

View File

@ -18,20 +18,20 @@ The Language Pack contract is implemented in the following built-in templates.
|Language|Format|
|---|---|
|Go|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/go/cloudevents)|
|Go|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/go/http)|
|Node.js|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/node/cloudevents)|
|Node.js|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/node/http)|
|Python|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/python/cloudevents)|
|Python|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/python/http)|
|Quarkus|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/quarkus/cloudevents)|
|Quarkus|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/quarkus/http)|
|Rust|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/rust/cloudevents)|
|Rust|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/rust/http)|
|Springboot|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/springboot/cloudevents)|
|Springboot|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/springboot/http)|
|TypeScript|[CloudEvents](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/typescript/cloudevents)|
|TypeScript|[HTTP](https://github.com/knative-sandbox/kn-plugin-func/tree/main/templates/typescript/http)|
|Go|[CloudEvents](https://github.com/knative/func/tree/main/templates/go/cloudevents)|
|Go|[HTTP](https://github.com/knative/func/tree/main/templates/go/http)|
|Node.js|[CloudEvents](https://github.com/knative/func/tree/main/templates/node/cloudevents)|
|Node.js|[HTTP](https://github.com/knative/func/tree/main/templates/node/http)|
|Python|[CloudEvents](https://github.com/knative/func/tree/main/templates/python/cloudevents)|
|Python|[HTTP](https://github.com/knative/func/tree/main/templates/python/http)|
|Quarkus|[CloudEvents](https://github.com/knative/func/tree/main/templates/quarkus/cloudevents)|
|Quarkus|[HTTP](https://github.com/knative/func/tree/main/templates/quarkus/http)|
|Rust|[CloudEvents](https://github.com/knative/func/tree/main/templates/rust/cloudevents)|
|Rust|[HTTP](https://github.com/knative/func/tree/main/templates/rust/http)|
|Springboot|[CloudEvents](https://github.com/knative/func/tree/main/templates/springboot/cloudevents)|
|Springboot|[HTTP](https://github.com/knative/func/tree/main/templates/springboot/http)|
|TypeScript|[CloudEvents](https://github.com/knative/func/tree/main/templates/typescript/cloudevents)|
|TypeScript|[HTTP](https://github.com/knative/func/tree/main/templates/typescript/http)|
### Built-in Template APIs

View File

@ -10,7 +10,7 @@ import (
"time"
"gopkg.in/yaml.v2"
fnlabels "knative.dev/kn-plugin-func/k8s/labels"
fnlabels "knative.dev/func/k8s/labels"
"knative.dev/pkg/ptr"
)

View File

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"knative.dev/kn-plugin-func/utils"
"knative.dev/func/utils"
)
type Env struct {

View File

@ -5,7 +5,7 @@ import (
"os"
"strings"
"knative.dev/kn-plugin-func/utils"
"knative.dev/func/utils"
)
type Label struct {
@ -33,10 +33,10 @@ func (l Label) String() string {
// Returns array of error messages, empty if no errors are found
//
// Allowed settings:
// - key: EXAMPLE1 # label directly from a value
// value: value1
// - key: EXAMPLE2 # label from the local ENV var
// value: {{ env:MY_ENV }}
// - key: EXAMPLE1 # label directly from a value
// value: value1
// - key: EXAMPLE2 # label from the local ENV var
// value: {{ env:MY_ENV }}
func ValidateLabels(labels []Label) (errors []string) {
for i, label := range labels {
if label.Key == nil && label.Value == nil {

View File

@ -9,8 +9,8 @@ import (
"github.com/google/go-cmp/cmp"
fn "knative.dev/kn-plugin-func"
. "knative.dev/kn-plugin-func/testing"
fn "knative.dev/func"
. "knative.dev/func/testing"
)
// TestFunction_WriteIdempotency ensures that a function can be written repeatedly

View File

@ -7,7 +7,7 @@ import (
"reflect"
"testing"
fnlabels "knative.dev/kn-plugin-func/k8s/labels"
fnlabels "knative.dev/func/k8s/labels"
)
func TestFunction_ImageWithDigest(t *testing.T) {

2
go.mod
View File

@ -1,4 +1,4 @@
module knative.dev/kn-plugin-func
module knative.dev/func
go 1.18

View File

@ -11,7 +11,7 @@ import (
"net/http"
"time"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
type ContextDialer interface {

View File

@ -14,7 +14,7 @@ import (
"testing"
"time"
fnhttp "knative.dev/kn-plugin-func/http"
fnhttp "knative.dev/func/http"
)
const inClusterHostName = "a-testing-service.a-testing-namespace.svc"

View File

@ -9,7 +9,7 @@ import (
"strings"
"testing"
. "knative.dev/kn-plugin-func/testing"
. "knative.dev/func/testing"
)
// TestInstances_LocalErrors tests the three possible error states for a function

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
func TestListConfigMapsNamesIfConnectedWrongKubeconfig(t *testing.T) {

View File

@ -15,7 +15,7 @@ import (
"testing"
"time"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
coreV1 "k8s.io/api/core/v1"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
func TestListSecretsNamesIfConnectedWrongKubeconfig(t *testing.T) {

View File

@ -9,7 +9,7 @@ import (
eventingv1 "knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1"
servingv1 "knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
const (

View File

@ -22,8 +22,8 @@ import (
"knative.dev/serving/pkg/apis/autoscaling"
v1 "knative.dev/serving/pkg/apis/serving/v1"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/k8s"
fn "knative.dev/func"
"knative.dev/func/k8s"
)
const LIVENESS_ENDPOINT = "/health/liveness"

View File

@ -9,7 +9,7 @@ import (
"testing"
corev1 "k8s.io/api/core/v1"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
// Test_DefaultNamespace ensures that if there is an active kubeconfig,

View File

@ -7,8 +7,8 @@ import (
clientservingv1 "knative.dev/client/pkg/serving/v1"
eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/k8s"
fn "knative.dev/func"
"knative.dev/func/k8s"
)
type Describer struct {

View File

@ -7,9 +7,9 @@ import (
clientservingv1 "knative.dev/client/pkg/serving/v1"
"knative.dev/pkg/apis"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/kn-plugin-func/k8s/labels"
fn "knative.dev/func"
"knative.dev/func/k8s"
"knative.dev/func/k8s/labels"
)
type Lister struct {

View File

@ -12,7 +12,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
// GetKServiceLogs will get logs of Knative service.

View File

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
const RemoveTimeout = 120 * time.Second

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Builder struct {

View File

@ -1,7 +1,7 @@
package mock
import (
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Client struct {

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Deployer struct {

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Describer struct {

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Lister struct {

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type PipelinesProvider struct {

View File

@ -3,7 +3,7 @@ package mock
import (
"context"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
type Pusher struct {

View File

@ -4,7 +4,7 @@ import (
"context"
"sync"
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
// Runner runs a function in a separate process, canceling it on context.Cancel.

View File

@ -1,7 +1,7 @@
package openshift
import (
fn "knative.dev/kn-plugin-func"
fn "knative.dev/func"
)
const (

View File

@ -15,10 +15,10 @@ import (
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/util/rand"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/docker/creds"
fnhttp "knative.dev/kn-plugin-func/http"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/docker"
"knative.dev/func/docker/creds"
fnhttp "knative.dev/func/http"
"knative.dev/func/k8s"
)
const (

View File

@ -8,8 +8,8 @@ import (
"testing"
fnhttp "knative.dev/kn-plugin-func/http"
"knative.dev/kn-plugin-func/openshift"
fnhttp "knative.dev/func/http"
"knative.dev/func/openshift"
)
func TestRoundTripper(t *testing.T) {

View File

@ -7,7 +7,7 @@ import (
"github.com/tektoncd/pipeline/pkg/client/clientset/versioned"
"github.com/tektoncd/pipeline/pkg/client/clientset/versioned/typed/pipeline/v1beta1"
"knative.dev/kn-plugin-func/k8s"
"knative.dev/func/k8s"
)
const (

View File

@ -16,11 +16,11 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8slabels "k8s.io/apimachinery/pkg/labels"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/docker"
"knative.dev/kn-plugin-func/k8s"
fnlabels "knative.dev/kn-plugin-func/k8s/labels"
"knative.dev/kn-plugin-func/knative"
fn "knative.dev/func"
"knative.dev/func/docker"
"knative.dev/func/k8s"
fnlabels "knative.dev/func/k8s/labels"
"knative.dev/func/knative"
"knative.dev/pkg/apis"
)

View File

@ -9,10 +9,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/buildpacks"
"knative.dev/kn-plugin-func/s2i"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/buildpacks"
"knative.dev/func/s2i"
)
func deletePipelines(ctx context.Context, namespaceOverride string, listOptions metav1.ListOptions) (err error) {

View File

@ -6,8 +6,8 @@ package tekton
import (
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
fn "knative.dev/func"
"knative.dev/func/builders"
)
func Test_generatePipeline(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"errors"
"fmt"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
"knative.dev/kn-plugin-func/s2i"
fn "knative.dev/func"
"knative.dev/func/builders"
"knative.dev/func/s2i"
)
var (

View File

@ -6,8 +6,8 @@ package tekton
import (
"testing"
fn "knative.dev/kn-plugin-func"
"knative.dev/kn-plugin-func/builders"
fn "knative.dev/func"
"knative.dev/func/builders"
)
func Test_validatePipeline(t *testing.T) {

View File

@ -10,7 +10,7 @@ import (
"knative.dev/client/pkg/kn/plugin"
"knative.dev/kn-plugin-func/cmd"
"knative.dev/func/cmd"
)
func init() {
@ -39,7 +39,7 @@ func (f *funcPlugin) Execute(args []string) error {
info, _ := debug.ReadBuildInfo()
for _, dep := range info.Deps {
if strings.Contains(dep.Path, "knative.dev/kn-plugin-func") {
if strings.Contains(dep.Path, "knative.dev/func") {
version.Vers = dep.Version
version.Hash = dep.Sum
}

View File

@ -10,8 +10,8 @@ import (
"github.com/google/go-cmp/cmp"
fn "knative.dev/kn-plugin-func"
. "knative.dev/kn-plugin-func/testing"
fn "knative.dev/func"
. "knative.dev/func/testing"
)
// RepositoriesTestRepo is the general-purpose example repository for most

Some files were not shown because too many files have changed in this diff Show More