Unverified Commit 07bc807e authored by Bryan Liles's avatar Bryan Liles Committed by GitHub
Browse files

Merge pull request #486 from bryanl/document-registry

Adding initial registry document
parents 244251d6 08aa4986
# ksonnet Registries
ksonnet registries allow for sharing of code used to build ksonnet components. Currently, ksonnet supports two types of registries: `github` and `fs`.
## GitHub Registries
`github` registries are hosted on GitHub.
## Fs Registries
`fs` registries are hosted on the local filesystem. They can be used when developing a registry.
## Creating a Registry
Registries require a `registry.yaml` file. This file contains configuration for the registry and pointers to its components.
An example `registry.yaml`:
```yaml
apiVersion: 0.1.0
kind: ksonnet.io/registry
libraries:
scheduling:
path: scheduling
```
In this example, the registry contains a single library, `scheduling`, which lives in directory `scheduling`. This path is relative to the directory that contains `registry.yaml`.
// Copyright 2018 The kubecfg 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 metadata
import (
"path/filepath"
"github.com/ksonnet/ksonnet/pkg/registry"
)
func (m *manager) registryDir(regManager registry.Registry) string {
return filepath.Join(m.registriesPath, regManager.RegistrySpecDir())
}
func (m *manager) registryPath(regManager registry.Registry) string {
path := regManager.RegistrySpecFilePath()
if filepath.IsAbs(path) {
return path
}
return filepath.Join(m.registriesPath, regManager.RegistrySpecFilePath())
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment