Documentation ¶
Overview ¶
Copyright (c) 2019-2021 Red Hat, Inc. 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.
Copyright (c) 2019-2021 Red Hat, Inc. 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.
Copyright (c) 2019-2021 Red Hat, Inc. 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.
Copyright (c) 2019-2021 Red Hat, Inc. 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.
Copyright (c) 2019-2021 Red Hat, Inc. 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.
Index ¶
- Constants
- func DevWorkspaceIsFlattened(devworkspace *dw.DevWorkspaceTemplateSpec) bool
- func FormatVariablesWarning(warn *variables.VariableWarning) string
- func ResolveDevWorkspace(workspace *dw.DevWorkspaceTemplateSpec, tooling ResolverTools) (*dw.DevWorkspaceTemplateSpec, *variables.VariableWarning, error)
- type ResolverTools
Constants ¶
const ( // DWTSupportedNamespacesAnnotation defines additional namespaces from which a DevWorkspace can import a DevWorkspaceTemplate. // By default, importing templates from the same namespace as the DevWorkspace is allowed. // Options are: // - '*': allow importing by all DevWorkspaces on the cluster // - 'namespaceA,namespaceB,namespaceC': Allow importing by DevWorkspaces in list of specific namespaces // If the annotation does not exist or is empty, only DevWorkspaces in the same namespace as the template can reference it. DWTSupportedNamespacesAnnotation = "controller.devfile.io/allow-import-from" )
const ( // WorkspaceEnvAttribute is an attribute that specifies a set of environment variables provided by a component // that should be added to all workspace containers. The structure of the attribute value should be a list of // Devfile 2.0 EnvVar, e.g. // // attributes: // workspaceEnv: // - name: ENV_1 // value: VAL_1 // - name: ENV_2 // value: VAL_2 WorkspaceEnvAttribute = "workspaceEnv" )
Variables ¶
This section is empty.
Functions ¶
func DevWorkspaceIsFlattened ¶
func DevWorkspaceIsFlattened(devworkspace *dw.DevWorkspaceTemplateSpec) bool
func FormatVariablesWarning ¶ added in v0.9.0
func FormatVariablesWarning(warn *variables.VariableWarning) string
func ResolveDevWorkspace ¶
func ResolveDevWorkspace(workspace *dw.DevWorkspaceTemplateSpec, tooling ResolverTools) (*dw.DevWorkspaceTemplateSpec, *variables.VariableWarning, error)
ResolveDevWorkspace takes a devworkspace and returns a "resolved" version of it -- i.e. one where all plugins and parents are inlined as components.
Types ¶
type ResolverTools ¶
type ResolverTools struct { WorkspaceNamespace string Context context.Context K8sClient client.Client InternalRegistry registry.InternalRegistry HttpClient network.HTTPGetter }