Skip to content
Snippets Groups Projects
  1. Aug 30, 2017
    • Alex Clemmer's avatar
      Implement ClusterSpec.data for `version:` scheme · 4664eaa6
      Alex Clemmer authored
      `metadata.ClusterSpec` represents a specification for an abstract
      Kubernetes cluster. For example, `version:1.7.0` represents a Kubernetes
      cluster running a build from 1.7.0. This specification is primarily used
      to generate ksonnet-lib.
      
      This struct exposes a method, `data` that will retrieve the OpenAPI JSON
      that specifies the API for a Kubernetes cluster. Eventually, `data` will
      be able to read a file, pull from a URL, pull from a live cluster, or
      pull a specific version of the API from the official Kubernetes
      repository.
      
      This commit introduces the the last of these options.
      4664eaa6
    • Alex Clemmer's avatar
      Generate ksonnet-lib as part of `metadata.Manager` initialization · ccd74079
      Alex Clemmer authored
      `metadata.Init` is meant to initialize a ksonnet application, including
      its directory structure and the initial versions of various metadata
      files in the tree. But, this implementation is incomplete: currently
      only the directory tree is initialized.
      
      This commit will change init to generate ksonnet-lib as part of the
      initialization process.
      ccd74079
    • Alex Clemmer's avatar
      Vendor ksonnet-lib/ksonnet-gen · ee31939b
      Alex Clemmer authored
      The ksonnet-lib codebase exposes a package, ksonnet-gen, which will
      automatically generate the ksonnet library for a given OpenAPI
      specification of the Kubernetes API.
      
      This commit vendors only the source in the ksonnet-gen package (rather
      than the entire repository) as a dependency in the kubecfg project.
      ee31939b
    • Alex Clemmer's avatar
      Drop support for go 1.7 · 408a5925
      Alex Clemmer authored
      The codegen routines for ksonnet-lib depend on some Go 1.8 features
      (e.g., `sort.Slice`). Once we vendor the dependency, this will cause the
      build to fail perpetually for Go 1.7.
      
      This commit therefore drops support for 1.7, making 1.8 the line of
      supportability. This decision was made together with @anguslees, in
      slack PMs.
      408a5925
  2. Aug 16, 2017
  3. Aug 15, 2017
    • Alex Clemmer's avatar
      First cut at core app metadata management facilities · 57351df8
      Alex Clemmer authored
      Much of the tooling build around ksonnet applications will be powered by
      metadata presented in a structured directory format. This is similar in
      principle to how Hugo and Rails structure web applications.
      
      This commit will begin the process of introducing a FS-based state
      machine that manages this directory structure. Primarily, this involves
      introducing:
      
      1. Init routines for the directory structure
      2. Routines to search parent directories for a ksonnet application
         (similar to how git does this with repositories)
      
      Initially, the directory structures looks like this:
      
        app-name/
          .ksonnet/   Metadata for ksonnet
          components/ Top-level Kubernetes objects defining application
          lib/        User-written .libsonnet files
          vendor/     Mixin libraries, prototypes
      
      The `.ksonnet` file marks the application root, making it possible to
      search parent directories for the root.
      
      As time continues, more verbs will be introduced to manipulate this
      metadata (including, e.g., vendoring dependencies, searching prototypes,
      and so on).
      57351df8
    • Alex Clemmer's avatar
      Add Afero as vendored dependency · 11efba2b
      Alex Clemmer authored
      Despite being seemingly the most popular mockable FS library, Afero does
      not tag releases in git, and does not appear to have cut a release in
      about a year. Hence, the following considerations were taken into
      account when we vendored the dependency:
      
      * The commits since the last release (2015) appear to be almost entirely
        bug fixes.
      * In the case that we are calling to the OS's FS (rather than, say, a
        testable, memory-mapped FS), the Afero is a simple wrapper, and hence
        introduces little risk into the CLI tool. We verified this by looking
        at the actual source.
      * We opened issue #129 to attempt to nudge the committers into using
        stable software engineering practices (e.g., tagging your releases),
        and we will see how this issue evolves.
      11efba2b
  4. Aug 14, 2017
  5. Aug 09, 2017
  6. Aug 08, 2017
  7. Aug 02, 2017
  8. Aug 01, 2017
  9. Jul 27, 2017
    • Angus Lees's avatar
      Merge pull request #67 from anguslees/toyaml · e515524e
      Angus Lees authored
      Add manifestJson and manifestYaml functions
      e515524e
    • Angus Lees's avatar
      Add manifestJson and manifestYaml functions · 1f85d5dd
      Angus Lees authored
      jsonnet's `std.toString()` returns "compact" JSON.  Sometimes this is
      not appropriate, particularly when generating large output that might
      need to be viewed/debugged by a human.
      
      This change implements manifestYaml and manifestJson functions, which
      generate YAML and "pretty" JSON respectively.
      
      A slight implementation wrinkle is that libjsonnet currently only
      supports passing primitive (scalar) types to native functions, so
      these arguments need to be JSON-serialised/unserialised across the
      native function call boundary.
  10. Jul 26, 2017
  11. Jul 25, 2017
  12. Jul 17, 2017
  13. Jul 14, 2017
  14. Jul 10, 2017
  15. Jul 09, 2017
  16. Jul 07, 2017