Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysJackson committed Jan 19, 2018
1 parent 3239768 commit dd993a3
Show file tree
Hide file tree
Showing 16 changed files with 240 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.httr-oauth$
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
test.R
.httr-oauth
10 changes: 10 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: googleKubernetesR
Title: R interface to Google Cloud Kubernetes Engine
Version: 0.0.0.9000
Authors@R: person("Rhys", "Jackson", email = "[email protected]", role = c("aut", "cre"))
Description: The Google Kubernetes Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.
Depends: R (>= 3.4.2)
License: Year: 2017 Copyright Holder: Rhys Jackson
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1.9000
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2018
COPYRIGHT HOLDER: Rhys Jackson
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(completeIpRotation)
export(getCluster)
export(getServerConfig)
export(listClusters)
export(setAddons)
17 changes: 17 additions & 0 deletions R/completeIpRotation.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#' completeIpRotation
#'
#' Completes master IP rotation.
#' @param projectId The Google Developers Console project ID or project number.
#' @param zone The name of the Google Compute Engine zone in which the cluster resides.
#' @param clusterId The name of the cluster.
#' @keywords projects.locations.getServerConfig
#' @export
#' @examples
#' completeIpRotation(projectId = "myProjectId", zone = "europe-west1-d", clusterId = "cluster-1")

completeIpRotation <- function(projectId, zone, clusterId) {
f <- gar_api_generator("https://container.googleapis.com/v1beta1",
"POST",
path_args = list(projects = projectId, locations = zone, clusters = clusterId, `:completeIpRotation` = ""))
f()
}
17 changes: 17 additions & 0 deletions R/getCluster.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#' getCluster
#'
#' Gets the details of a specific cluster.
#' @param projectId The Google Developers Console project ID or project number.
#' @param zone The name of the Google Compute Engine zone in which the cluster resides.
#' @param clusterId The name of the cluster to retrieve.
#' @keywords projects.locations.clusters.get
#' @export
#' @examples
#' getCluster(projectId = "myProjectId", zone = "europe-west1-d", clusterId = "cluster-1")

getCluster <- function(projectId, zone, clusterId) {
f <- gar_api_generator("https://container.googleapis.com/v1beta1",
"GET",
path_args = list(projects = projectId, locations = zone, clusters = clusterId))
f()
}
16 changes: 16 additions & 0 deletions R/getServerConfig.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' getServerConfig
#'
#' Returns configuration info about the Kubernetes Engine service.
#' @param projectId The Google Developers Console project ID or project number.
#' @param zone The name of the Google Compute Engine zone in which the cluster resides.
#' @keywords projects.locations.getServerConfig
#' @export
#' @examples
#' getServerConfig(projectId = "myProjectId", zone = "europe-west1-d")

getServerConfig <- function(projectId, zone) {
f <- gar_api_generator("https://container.googleapis.com/v1beta1",
"GET",
path_args = list(projects = projectId, locations = zone, serverConfig = ""))
f()
}
16 changes: 16 additions & 0 deletions R/listClusters.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' listClusters
#'
#' Lists all clusters owned by a project in either the specified zone or all zones.
#' @param projectId The Google Developers Console project ID or project number.
#' @param zone The name of the Google Compute Engine zone in which the cluster resides, or "-" for all zones. Defaults to all zones.
#' @keywords projects.locations.clusters.get
#' @export
#' @examples
#' listClusters(projectId = "myProjectId", location = "europe-west1-d")

listClusters <- function(projectId, zone = "-") {
f <- gar_api_generator("https://container.googleapis.com/v1beta1",
"GET",
path_args = list(projects = projectId, locations = zone, clusters = ""))
f()
}
20 changes: 20 additions & 0 deletions R/setAddons.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#' setAddons
#'
#' Sets the addons of a specific cluster.
#' @param projectId The Google Developers Console project ID or project number.
#' @param zone The name of the Google Compute Engine zone in which the cluster resides.
#' @param clusterId The name of the cluster to retrieve.
#' @keywords projects.zones.clusters.addons
#' @export
#' @examples
#' setAddons(projectId = "myProjectId", location = "europe-west1-d", clusterId = "cluster-1", addonsConfig = list(httpLoadBalancing = list(disabled = FALSE)))

setAddons <- function(projectId, zone, clusterId, addonsConfig) {
body <- list(
addonsConfig = addonsConfig
)
f <- gar_api_generator("https://container.googleapis.com/v1beta1",
"POST",
path_args = list(projects = projectId, zones = zone, clusters = clusterId, addons = ""))
f(the_body = body)
}
21 changes: 21 additions & 0 deletions googleKubernetesR.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Version: 1.0

RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
22 changes: 22 additions & 0 deletions man/completeIpRotation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/getCluster.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/getServerConfig.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/listClusters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/setAddons.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dd993a3

Please sign in to comment.